This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
forked from thehyve/glowing-bear
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tooltip for more information about a concept constraint in explore
- Loading branch information
1 parent
f7b5f54
commit e8c5e0f
Showing
12 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
2 changes: 2 additions & 0 deletions
2
...e-module/constraint-components/gb-concept-constraint/gb-tooltip/gb-tooltip.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
<i *ngIf="canDisplay()" style="margin-left: 1em; color: var(--gb-clinical-green);" class="fa fa-info-circle" tooltipPosition="top" pTooltip="Informations: {{infos}}"></i> |
35 changes: 35 additions & 0 deletions
35
...ore-module/constraint-components/gb-concept-constraint/gb-tooltip/gb-tooltip.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright 2017 - 2018 The Hyve B.V. | ||
* Copyright 2020 - 2021 CHUV | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import { Component, Inject, Input, OnInit } from "@angular/core"; | ||
import { ValueType } from "src/app/models/constraint-models/value-type"; | ||
import { GbConceptConstraintComponent } from "../gb-concept-constraint.component"; | ||
|
||
@Component({ | ||
selector: 'gb-tooltip', | ||
templateUrl: './gb-tooltip.component.html', | ||
styleUrls: ['./gb-tooltip.component.css'] | ||
}) | ||
export class GbTooltipComponent implements OnInit { | ||
|
||
infos: string; | ||
|
||
constructor(@Inject(GbConceptConstraintComponent) private parentConcept: GbConceptConstraintComponent) { | ||
this.infos = this.parentConcept.selectedConcept.comment | ||
} | ||
|
||
canDisplay(): boolean { | ||
return (this.parentConcept.constraintConcept.type === ValueType.TEXT && this.parentConcept.textOperatorState !== null) || | ||
(this.parentConcept.constraintConcept.type === ValueType.NUMERICAL && this.parentConcept.numericalOperatorState !== null); | ||
} | ||
|
||
|
||
ngOnInit() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters