Skip to content
Snippets Groups Projects
Commit cef6099a authored by Xiao Gui's avatar Xiao Gui
Browse files

feat: added under review warning

parent 4c5e158f
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,8 @@
TEMPLATE_NOT_FOUND: `Template not found. Maybe it is still loading. Try again in a few seconds?`,
PARC_NOT_FOUND: ``,
PINNED_DATASETS_BADGE_DESC: `Number of pinned datasets`
PINNED_DATASETS_BADGE_DESC: `Number of pinned datasets`,
GDPR_TEXT: `This dataset is currently reviewed by the EBRAINS Data Protection Office regarding GDPR compliance. Therefore the atlas does not provide access to the underlying data files yet. The data will be available after this review.`
}
})(typeof exports === 'undefined' ? module.exports : exports)
......@@ -6,6 +6,7 @@ import { Action } from '@ngrx/store'
import { GENERAL_ACTION_TYPES } from '../stateStore.service'
import { LOCAL_STORAGE_CONST } from 'src/util/constants'
import { datastateActionUpdateFavDataset } from './dataState/actions'
import { IHasId } from 'src/util/interfaces'
/**
* TODO merge with databrowser.usereffect.ts
......@@ -114,7 +115,7 @@ export interface IDataEntry {
referenceSpaces: IReferenceSpace[]
files: File[]
publications: IPublication[]
embargoStatus: string[]
embargoStatus: IHasId[]
methods: string[]
protocols: string[]
......
import { InjectionToken } from "@angular/core";
import { LOCAL_STORAGE_CONST } from "src/util/constants";
import { Observable } from "rxjs";
import { IHasId } from "src/util/interfaces";
export const UNDER_REVIEW = {
['@id']: "https://nexus.humanbrainproject.org/v0/data/minds/core/embargostatus/v1.0.0/1d726b76-b176-47ed-96f0-b4f2e17d5f19"
}
export const OVERRIDE_IAV_DATASET_PREVIEW_DATASET_FN = new InjectionToken<(file: any, dataset: any) => void>('OVERRIDE_IAV_DATASET_PREVIEW_DATASET_FN')
export const DATASTORE_DEFAULT_STATE = {
......@@ -74,7 +79,7 @@ export interface IKgDataEntry {
referenceSpaces: IKgReferenceSpace[]
files: File[]
publications: IKgPublication[]
embargoStatus: string[]
embargoStatus: IHasId[]
methods: string[]
protocols: string[]
......
......@@ -5,7 +5,7 @@ import { REGION_OF_INTEREST, TRegionOfInterest } from "src/util/interfaces";
import { DatabrowserService } from "../../databrowser.service";
import { KgSingleDatasetService } from "../../kgSingleDatasetService.service";
import { SingleDatasetBase } from "../singleDataset.base";
import { CONST } from 'common/constants'
@Component({
selector: 'single-dataset-sidenav-view',
......@@ -21,6 +21,8 @@ export class SingleDatasetSideNavView extends SingleDatasetBase implements OnCha
@Output()
clear: EventEmitter<null> = new EventEmitter()
public GDPR_TEXT = CONST.GDPR_TEXT
constructor(
dbService: DatabrowserService,
sDsService: KgSingleDatasetService,
......
......@@ -22,6 +22,12 @@
Dataset
</span>
<button *ngIf="isGdprProtected"
[matTooltip]="GDPR_TEXT"
mat-icon-button color="warn">
<i class="fas fa-exclamation-triangle"></i>
</button>
<mat-divider [vertical]="true" class="ml-2 h-2rem"></mat-divider>
<!-- explore btn -->
......
......@@ -12,6 +12,7 @@ import { MatSnackBar } from "@angular/material/snack-bar";
import { ARIA_LABELS } from 'common/constants'
import { switchMap, distinctUntilChanged, filter } from "rxjs/operators";
import { IContributor } from "../contributor";
import { UNDER_REVIEW } from "../constants";
const getDirectLinkToKg = (dataset: { fullId: string, id: string }) => {
const { id } = dataset
......@@ -96,6 +97,8 @@ export class SingleDatasetBase implements OnChanges, OnDestroy {
public DS_PREVIEW_URL = DS_PREVIEW_URL
public strictLocal: boolean = STRICT_LOCAL
public isGdprProtected: boolean = false
/**
* sic!
*/
......@@ -144,7 +147,7 @@ export class SingleDatasetBase implements OnChanges, OnDestroy {
const { kgSchema, kgId } = this
const { name, description, publications, fullId, kgReference, files, contributors, ...rest } = dataset
const { name, description, publications, fullId, kgReference, files, contributors, embargoStatus, ...rest } = dataset
this.name = name
this.description = description
this.publications = publications
......@@ -152,6 +155,8 @@ export class SingleDatasetBase implements OnChanges, OnDestroy {
this.files = files
this.fullId = fullId
this.isGdprProtected = embargoStatus.some(s => s['@id'] === UNDER_REVIEW['@id'])
this.kgReference = kgReference
this.directLinkToKg = getDirectLinkToKg(dataset)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment