Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch retracted status from Retraction Watch and display information; Consistently fetch flagged/deprecated/status tag attributes #1047

Merged
merged 9 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,50 @@
<ng-template #activityHeaderTemplate>
<cvc-user-tag [user]="activity.user"></cvc-user-tag>
{{ activity.verbiage }}
<ng-container [ngSwitch]="activity.subject.__typename">
<cvc-feature-tag
*ngSwitchCase="'Feature'"
[feature]="activity.subject"></cvc-feature-tag>
<cvc-assertion-tag
*ngSwitchCase="'Assertion'"
[assertion]="activity.subject"></cvc-assertion-tag>
<cvc-evidence-tag
*ngSwitchCase="'EvidenceItem'"
[evidence]="activity.subject"></cvc-evidence-tag>
<cvc-feature-variant-tag
*ngSwitchCase="'Variant'"
[variant]="activity.subject"></cvc-feature-variant-tag>
<cvc-revision-tag
*ngSwitchCase="'Revision'"
[revision]="$any(activity.subject)"></cvc-revision-tag>
<cvc-variant-group-tag
*ngSwitchCase="'VariantGroup'"
[variantgroup]="activity.subject"></cvc-variant-group-tag>
<cvc-source-tag
*ngSwitchCase="'Source'"
mode="concise"
[source]="$any(activity.subject)"></cvc-source-tag>
<cvc-molecular-profile-tag
*ngSwitchCase="'MolecularProfile'"
[molecularProfile]="
activity.subject
"></cvc-molecular-profile-tag>
<span *ngSwitchDefault>{{ activity.subject.name }}</span>
</ng-container>
·
@switch (activity.subject.__typename) {
@case ('Feature') {
<cvc-feature-tag
[feature]="activity.subject"></cvc-feature-tag>
}
@case ('Assertion') {
<cvc-assertion-tag
[assertion]="activity.subject"></cvc-assertion-tag>
}
@case ('EvidenceItem') {
<cvc-evidence-tag
[evidence]="activity.subject"></cvc-evidence-tag>
}
@case ('GeneVariant') {
<cvc-feature-variant-tag
[variant]="activity.subject"></cvc-feature-variant-tag>
}
@case ('FactorVariant') {
<cvc-feature-variant-tag
[variant]="activity.subject"></cvc-feature-variant-tag>
}
@case ('Revision') {
<cvc-revision-tag
[revision]="$any(activity.subject)"></cvc-revision-tag>
}
@case ('VariantGroup') {
<cvc-variant-group-tag
[variantgroup]="activity.subject"></cvc-variant-group-tag>
}
@case ('Source') {
<cvc-source-tag
mode="concise"
[source]="$any(activity.subject)"></cvc-source-tag>
}
@case ('MolecularProfile') {
<cvc-molecular-profile-tag
[molecularProfile]="
activity.subject
"></cvc-molecular-profile-tag>
}
@default {
<span *ngSwitchDefault>{{ activity.subject.name }}</span>
}
}
<span
nz-tooltip
nzTooltipPlacement="top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,36 @@ fragment activityFeedNode on ActivityInterface {
}
... on EvidenceItem {
status
flagged
}
... on Assertion {
status
flagged
}
... on Revision {
revisionSetId
}
... on VariantInterface {
deprecated
flagged
feature {
id
name
link
deprecated
flagged
}
}
... on MolecularProfile {
deprecated
flagged
}
... on Feature {
deprecated
flagged
}
... on VariantGroup {
flagged
}
__typename
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ fragment assertionPopover on Assertion {
id
name
link
deprecated
}
therapyInteractionType
disease {
id
name
link
deprecated
}
phenotypes {
id
Expand All @@ -53,6 +55,8 @@ fragment assertionPopover on Assertion {
parsedName {
...MolecularProfileParsedName
}
deprecated
flagged
}
flags(state: OPEN) {
totalCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,19 @@ fragment AssertionBrowseFields on Assertion {
parsedName {
...MolecularProfileParsedName
}
deprecated
}
disease {
id
name
link
deprecated
}
therapies {
id
name
link
deprecated
}
therapyInteractionType
summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export interface LinkableAssertion {
id: number
name: string
link: string
status?: EvidenceStatus
flagged?: boolean
status: EvidenceStatus
flagged: boolean
}

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,29 @@
<ng-container *ngIf="c.__typename == 'User'">
<cvc-user-tag [user]="c"></cvc-user-tag>
</ng-container>
<ng-container *ngIf="c.__typename == 'CommentTagSegment'">
<ng-container *ngIf="c.__typename == 'CommentTagSegmentFlagged'">
<ng-container [ngSwitch]="c.tagType">
<span *ngSwitchCase="'REVISION'">
<!--<cvc-revision-tag-->
<!--[revision]="{-->
<!--id: c.entityId,-->
<!--name: c.displayName,-->
<!--link: c.link,-->
<!--revisionSetId: c.revisionSetId!-->
<!--}"></cvc-revision-tag>-->
<nz-tag>
<i
nz-icon
nzType="civic-revision"
nzTheme="twotone"
nzTwotoneColor="#F0673A"></i>
{{ c.displayName }}
</nz-tag>
</span>
<span *ngSwitchCase="'FEATURE'">
<cvc-feature-tag
[feature]="{
id: c.entityId,
name: c.displayName,
link: c.link
}"></cvc-feature-tag>
</span>
<span *ngSwitchCase="'VARIANT'">
<cvc-feature-variant-tag
[variant]="{
id: c.entityId,
name: c.displayName,
link: c.link,
deprecated: c.deprecated,
feature: c.feature
}"></cvc-feature-variant-tag>
</span>
<span *ngSwitchCase="'VARIANT_GROUP'">
<cvc-variant-group-tag
[variantgroup]="{
id: c.entityId,
name: c.displayName,
link: c.link
link: c.link,
flagged: c.flagged
}"></cvc-variant-group-tag>
</span>
</ng-container>
</ng-container>
<ng-container *ngIf="c.__typename == 'CommentTagSegmentFlaggedAndWithStatus'">
<ng-container [ngSwitch]="c.tagType">
<span *ngSwitchCase="'EVIDENCE_ITEM'">
<cvc-evidence-tag
[evidence]="{
id: c.entityId,
name: c.displayName,
status: c.status,
link: c.link
link: c.link,
flagged: c.flagged
}"></cvc-evidence-tag>
</span>
<span *ngSwitchCase="'ASSERTION'">
Expand All @@ -65,25 +36,73 @@
id: c.entityId,
name: c.displayName,
status: c.status,
link: c.link
link: c.link,
flagged: c.flagged
}"></cvc-assertion-tag>
</span>
<span *ngSwitchCase="'ORGANIZATION'">
<cvc-organization-tag
[org]="{
</ng-container>
</ng-container>
<ng-container *ngIf="c.__typename == 'CommentTagSegmentFlaggedAndDeprecated'">
<ng-container [ngSwitch]="c.tagType">
<span *ngSwitchCase="'VARIANT'">
<cvc-feature-variant-tag
[variant]="{
id: c.entityId,
name: c.displayName
}"></cvc-organization-tag>
name: c.displayName,
link: c.link,
deprecated: c.deprecated,
feature: c.feature,
flagged: c.flagged
}"></cvc-feature-variant-tag>
</span>
<span *ngSwitchCase="'MOLECULAR_PROFILE'">
<cvc-molecular-profile-tag
[molecularProfile]="{
id: c.entityId,
name: c.displayName,
link: c.link,
deprecated: c.deprecated
deprecated: c.deprecated,
flagged: c.flagged
}"></cvc-molecular-profile-tag>
</span>
<span *ngSwitchCase="'FEATURE'">
<cvc-feature-tag
[feature]="{
id: c.entityId,
name: c.displayName,
link: c.link,
deprecated: c.deprecated,
flagged: c.flagged
}"></cvc-feature-tag>
</span>
</ng-container>
</ng-container>
<ng-container *ngIf="c.__typename == 'CommentTagSegment'">
<ng-container [ngSwitch]="c.tagType">
<span *ngSwitchCase="'REVISION'">
<!--<cvc-revision-tag-->
<!--[revision]="{-->
<!--id: c.entityId,-->
<!--name: c.displayName,-->
<!--link: c.link,-->
<!--revisionSetId: c.revisionSetId!-->
<!--}"></cvc-revision-tag>-->
<nz-tag>
<i
nz-icon
nzType="civic-revision"
nzTheme="twotone"
nzTwotoneColor="#F0673A"></i>
{{ c.displayName }}
</nz-tag>
</span>
<span *ngSwitchCase="'ORGANIZATION'">
<cvc-organization-tag
[org]="{
id: c.entityId,
name: c.displayName
}"></cvc-organization-tag>
</span>
<span *ngSwitchCase="'ROLE'">
<nz-tag
><i
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Component, Input, OnInit } from '@angular/core'
import {
CommentTagSegment,
CommentTagSegmentFlagged,
CommentTagSegmentFlaggedAndDeprecated,
CommentTagSegmentFlaggedAndWithStatus,
CommentTextSegment,
} from '@app/generated/civic.apollo'

Expand All @@ -14,6 +17,9 @@ interface CommentBodyUserSegment {
export type CommentSegment =
| CommentBodyUserSegment
| CommentTagSegment
| CommentTagSegmentFlagged
| CommentTagSegmentFlaggedAndDeprecated
| CommentTagSegmentFlaggedAndWithStatus
| CommentTextSegment

@Component({
Expand Down
Loading
Loading