Skip to content

Commit 39e4d91

Browse files
authored
[ENG-9618] handle no affiliated user in admin table panel #801
- Ticket: https://openscience.atlassian.net/browse/ENG-9618 - Feature flag: n/a ## Purpose Dashboard shows blank for contributors column in projects tab. When clicked on the project guid, project is affiliated to institution and admin user is shown ## Summary of Changes It looks the affiliation process goes ok for new records https://openscience.atlassian.net/browse/ENG-9618?focusedCommentId=94164 , add info icon message for records with no affiliation
1 parent 46b137d commit 39e4d91

File tree

3 files changed

+35
-23
lines changed

3 files changed

+35
-23
lines changed

src/app/features/admin-institutions/components/admin-table/admin-table.component.html

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -122,30 +122,39 @@
122122
</a>
123123
} @else if (col.isLink && col.isArray && isLinkArray(currentColumnField)) {
124124
<div class="flex gap-1 align-items-center flex-wrap">
125-
@for (link of currentColumnField; track $index) {
125+
@if (currentColumnField.length === 0 && col.field === 'creator') {
126126
<div class="flex-1 flex align-items-center gap-1">
127-
<a
128-
[href]="link.url"
129-
[target]="col.linkTarget ?? '_self'"
130-
class="font-bold"
131-
[ngClass]="{ 'max-w-link-with-icon': col.showIcon, 'max-w-full-link': !col.showIcon }"
132-
>
133-
<span class="overflow-hidden text-overflow-ellipsis whitespace-nowrap block">
134-
{{ link.text + ($last ? '' : ',') }}</span
135-
>
136-
</a>
137-
@if (col.showIcon) {
138-
<p-button
139-
[pTooltip]="col.iconTooltip | translate"
140-
class="icon-button"
141-
[icon]="col.iconClass"
142-
variant="text"
143-
severity="info"
144-
[ariaLabel]="'common.accessibility.tooltipBtn' | translate"
145-
(onClick)="onIconClick(rowData, col, $index)"
146-
/>
147-
}
127+
<osf-info-icon
128+
[tooltipText]="'adminInstitutions.institutionUsers.notBibliographicOrAffiliatedUserText'"
129+
tooltipPosition="bottom"
130+
></osf-info-icon>
148131
</div>
132+
} @else {
133+
@for (link of currentColumnField; track $index) {
134+
<div class="flex-1 flex align-items-center gap-1">
135+
<a
136+
[href]="link.url"
137+
[target]="col.linkTarget ?? '_self'"
138+
class="font-bold"
139+
[ngClass]="{ 'max-w-link-with-icon': col.showIcon, 'max-w-full-link': !col.showIcon }"
140+
>
141+
<span class="overflow-hidden text-overflow-ellipsis whitespace-nowrap block">
142+
{{ link.text + ($last ? '' : ',') }}</span
143+
>
144+
</a>
145+
@if (col.showIcon) {
146+
<p-button
147+
[pTooltip]="col.iconTooltip | translate"
148+
class="icon-button"
149+
[icon]="col.iconClass"
150+
variant="text"
151+
severity="info"
152+
[ariaLabel]="'common.accessibility.tooltipBtn' | translate"
153+
(onClick)="onIconClick(rowData, col, $index)"
154+
/>
155+
}
156+
</div>
157+
}
149158
}
150159
</div>
151160
} @else {

src/app/features/admin-institutions/components/admin-table/admin-table.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
TableIconClickEvent,
2121
} from '@osf/features/admin-institutions/models';
2222
import { CustomPaginatorComponent } from '@osf/shared/components/custom-paginator/custom-paginator.component';
23+
import { InfoIconComponent } from '@osf/shared/components/info-icon/info-icon.component';
2324
import { StopPropagationDirective } from '@osf/shared/directives/stop-propagation.directive';
2425
import { PaginationLinksModel } from '@osf/shared/models/pagination-links.model';
2526
import { SearchFilters } from '@osf/shared/models/search-filters.model';
@@ -43,6 +44,7 @@ import { DownloadType } from '../../enums';
4344
StopPropagationDirective,
4445
DatePipe,
4546
NgClass,
47+
InfoIconComponent,
4648
],
4749
templateUrl: './admin-table.component.html',
4850
styleUrl: './admin-table.component.scss',

src/assets/i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2884,7 +2884,8 @@
28842884
"orcid": "ORCID",
28852885
"noData": "No users found",
28862886
"messageSent": "Message has been sent.",
2887-
"requestSent": "Request has been sent."
2887+
"requestSent": "Request has been sent.",
2888+
"notBibliographicOrAffiliatedUserText": "The user is not bibliographic or no longer affiliated with the institution"
28882889
},
28892890
"projects": {
28902891
"title": "Title",

0 commit comments

Comments
 (0)