Skip to content

Commit

Permalink
fix: allow navigation to entities from disabled entity-select (#1256)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon <33730997+TheSlimvReal@users.noreply.github.com>
  • Loading branch information
sleidig and TheSlimvReal authored May 6, 2022
1 parent ef6be53 commit 0d62b44
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
(mouseenter)="showTooltip()"
(mouseleave)="hideTooltip()"
(click)="showDetailsPage()"
[ngClass]="{ inactive: !entity.isActive, clickable: !linkDisabled }"
[ngClass]="{ inactive: !entity.isActive }"
class="truncate-text"
>
<img [src]="entity.photo?.photo?.value" class="child-pic" i18n-alt="Alternative text for small picture" alt="Picture of a child"/>
<span class="underline-on-hover mat-body-1">{{ entity?.name }}</span>
<span class="mat-body-1">{{ entity?.name }}</span>
<span style="font-size: x-small" *ngIf="entity?.projectNumber"
> ({{ entity?.projectNumber }})</span
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@
.inactive {
color: grey;
}

.clickable {
cursor: pointer;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span>
<app-fa-dynamic-icon [icon]="icon" class="icon"></app-fa-dynamic-icon>
<span class="underline-on-hover">{{ entity?.name }}</span>
<span>{{ entity?.name }}</span>
</span>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
>
<app-display-entity
[entityToDisplay]="entity"
[linkDisabled]="true"
[linkDisabled]="formControl.enabled"
></app-display-entity>
<fa-icon
*ngIf="removable && formControl.enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
}

.remove-item {
margin: 0.15em;
margin-left: 0.5em;
cursor: pointer;
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<ng-container
*ngIf="entityBlockComponent && entityToDisplay"
[appDynamicComponent]="{
component: entityBlockComponent,
config: {
entity: entityToDisplay,
linkDisabled: linkDisabled,
tooltipDisabled: true
}
}"
>
</ng-container>
<ng-container *ngIf="!entityBlockComponent">
{{ entityToDisplay?.toString() }}
</ng-container>
<span [ngClass]="{ clickable: !linkDisabled }">
<ng-container
*ngIf="entityBlockComponent && entityToDisplay"
[appDynamicComponent]="{
component: entityBlockComponent,
config: {
entity: entityToDisplay,
linkDisabled: linkDisabled,
tooltipDisabled: true
}
}"
>
</ng-container>
<ng-container *ngIf="!entityBlockComponent">
{{ entityToDisplay?.toString() }}
</ng-container>
</span>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

.clickable {
cursor: pointer;
}
.clickable:hover {
text-decoration: underline;
}
5 changes: 0 additions & 5 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,3 @@ $standard-icon-size: 1.5em;
border-left: $standard-margin-small solid;
border-color: transparent;
}

.underline-on-hover:hover {
text-decoration: underline;
cursor: pointer;
}

0 comments on commit 0d62b44

Please sign in to comment.