Skip to content

Commit 90e3ecb

Browse files
authored
Merge branch 'qa' into devel
2 parents f836104 + a70925c commit 90e3ecb

File tree

15 files changed

+158
-70
lines changed

15 files changed

+158
-70
lines changed

package-lock.json

Lines changed: 53 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@angular/platform-browser-dynamic": "^20.3.1",
5050
"@angular/platform-server": "^20.3.1",
5151
"@angular/router": "^20.3.1",
52-
"@angular/ssr": "^20.3.2",
52+
"@angular/ssr": "^20.3.6",
5353
"@dotenvx/dotenvx": "^1.6.4",
5454
"angular-auth-oidc-client": "^14.1.5",
5555
"bootstrap": "^5.3.3",

src/app/mydata/components/profile/profile-panel/activity-item/activity-item.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
rows.length > 1 && i === rows.length - 1 && smallLastItem
4242
"
4343
>
44-
<div *ngIf="i === 0" class="title-bottom-pad font-weight-500">
44+
<div *ngIf="i === 0" class="font-weight-400">
4545
{{ value | capitalizeFirstLetter }}
4646
</div>
4747

src/app/mydata/components/profile/profile-panel/activity-item/activity-item.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.activity-item-wrap {
2+
font-weight: 400;
23
a {
3-
text-decoration: underline !important;
4+
text-decoration: underline 1px !important;
45
text-underline-offset: 2px;
56
font-weight: 500;
67
color: rgba(0, 0, 0, 0.87);

src/app/mydata/components/profile/profile-panel/panel-array-item/panel-array-item.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Copyright 2019 Ministry of Education and Culture, Finland
33
:author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi
44
:license: MIT -->
5-
<span [ngClass]="fieldType === (fieldTypes.activityPublication || fieldTypes.activityDataset || fieldTypes.activityDatasetOrcid) ? 'publication-item': ''">
5+
<div [ngClass]="fieldType === (fieldTypes.activityPublication || fieldTypes.activityDataset || fieldTypes.activityDatasetOrcid) ? 'publication-item': ''">
66
<ng-container *ngIf="!localized; else localizedTemplate">
77
<ng-container [ngSwitch]="fieldType">
88
<ng-container *ngSwitchCase="fieldTypes.personWebLink">
@@ -159,7 +159,7 @@
159159
</ng-container>
160160

161161
<!-- Publications badges -->
162-
<div class="badge-row gx-0 flex-wrap">
162+
<div *ngIf="_item.openAccess === 1 || _item.openAccess === '1' || _item.selfArchivedCode === '1' || _item.selfArchivedCode === 1 || _item.doi" class="badge-row gx-0 flex-wrap">
163163
<div class="d-flex flex-wrap">
164164
<app-tag-open-access class='me-2' *ngIf="_item.openAccess === 1 || _item.openAccess === '1' || _item.selfArchivedCode === '1' || _item.selfArchivedCode === 1"></app-tag-open-access>
165165
<app-tag-doi *ngIf="_item.doi" [linkDoi]="_item.doi"></app-tag-doi>
@@ -192,4 +192,4 @@
192192
</div>
193193
</ng-container>
194194
</ng-template>
195-
</span>
195+
</div>

src/app/mydata/components/profile/profile-panel/panel-array-item/panel-array-item.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.publication-item {
22
font-weight: 500;
33
color: rgba(0, 0, 0, 0.79);
4+
margin-bottom: -4px;
45
}
56

67
.badge-row {

src/app/mydata/components/profile/profile-summary/profile-summary.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
.year-caption {
2727
margin-left: 16px;
28-
font-size: 1rem;
28+
font-size: 1.1rem;
2929
margin-bottom: 15px;
3030
}
3131

src/app/mydata/components/profile/profile-summary/summary-portal-items/summary-portal-items.component.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,34 @@
1515
</div>
1616
<div class="summary-panel" *ngFor="let item of sortedItems.slice(0, itemDisplayCount); index as i">
1717

18+
<!-- YEAR CAPTIONS -->
1819
<ng-container *ngIf="item.itemMeta.show && fieldType !== FieldTypes.activityActivitiesAndRewards && fieldType !== FieldTypes.activityActivitiesAndRewardsOrcid && fieldType !== FieldTypes.activityActivitiesAndRewards">
1920

20-
<!-- PUBLICATIONS OR DATASETS YEAR (FIRST)-->
21+
<!-- OPEN ACCESS PUBLICATION CAPTION OR DATASETS YEAR (FIRST)-->
2122
<div *ngIf="i === 0 && (fieldType === FieldTypes.activityPublication || fieldType === FieldTypes.activityOrcidPublication || fieldType === FieldTypes.activityDataset || fieldType === FieldTypes.activityDatasetOrcid)" class="year-caption">
2223
<h3 *ngIf="hasOpenPublications && highlightOpenness">{{openAccessPublications}}</h3>
2324
<div class="fw-normal" *ngIf="!hasOpenPublications && highlightOpenness">{{noOpenAccessPublications}}</div>
2425
<span *ngIf="fieldType === fieldTypes.activityDataset">{{sortedItems.slice(0, itemDisplayCount)[i].year}}</span>
2526
</div>
2627

27-
<!-- PUBLICATIONS YEAR (NOT FIRST)-->
28+
2829
<div *ngIf="item?.nonOpenCaptionRow && highlightOpenness" class="year-caption mt-4"><h3>{{otherPublications}}</h3></div>
30+
31+
<!-- PUBLICATION YEAR CAPTION (FIRST)-->
2932
<div *ngIf="i === 0 && (fieldType === FieldTypes.activityPublication || fieldType === FieldTypes.activityOrcidPublication)" class="year-caption">
30-
{{sortedItems.slice(0, itemDisplayCount)[i].publicationYear}}
33+
<span *ngIf="sortedItems.slice(0, itemDisplayCount)[i].publicationYear !== 0">{{sortedItems.slice(0, itemDisplayCount)[i].publicationYear}}</span>
34+
<span *ngIf="sortedItems.slice(0, itemDisplayCount)[i].publicationYear === 0">{{publicationYearMissing}}</span>
3135
</div>
36+
37+
<!-- PUBLICATION YEAR CAPTION (NOT FIRST) -->
3238
<div *ngIf="i > 0 && sortedItems.slice(0, itemDisplayCount)[i].publicationYear !== sortedItems.slice(0, itemDisplayCount)[i-1].publicationYear" class="year-caption">
33-
{{sortedItems.slice(0, itemDisplayCount)[i].publicationYear}}
39+
<span *ngIf="sortedItems.slice(0, itemDisplayCount)[i].publicationYear !== 0">{{sortedItems.slice(0, itemDisplayCount)[i].publicationYear}}</span>
40+
<span *ngIf="sortedItems.slice(0, itemDisplayCount)[i].publicationYear === 0">{{publicationYearMissing}}</span>
3441
</div>
3542

3643
<!-- DATASETS YEAR (NOT FIRST) -->
3744
<div *ngIf="i > 0 && sortedItems.slice(0, itemDisplayCount)[i].year !== sortedItems.slice(0, itemDisplayCount)[i-1].year" class="year-caption">
38-
{{sortedItems.slice(0, itemDisplayCount)[i].publicationYear}}
45+
{{sortedItems.slice(0, itemDisplayCount)[i].year}}
3946
<span *ngIf="fieldType === fieldTypes.activityDataset">{{sortedItems.slice(0, itemDisplayCount)[i].year}}</span>
4047
</div>
4148

src/app/mydata/components/profile/profile-summary/summary-portal-items/summary-portal-items.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
margin-left: 16px;
33
margin-bottom: 15px;
44
font-weight: bold;
5+
font-size: 1.1rem;
56
color: #404040
67
}
78

src/app/mydata/components/profile/profile-summary/summary-portal-items/summary-portal-items.component.ts

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@ import { TertiaryButtonComponent } from '@shared/components/buttons/tertiary-but
1818
import { FilterLimitButtonComponent } from '@portal/components/filter-limit-button/filter-limit-button.component';
1919
import { MatCheckbox } from '@angular/material/checkbox';
2020

21-
@Component({
22-
selector: 'app-summary-portal-items',
23-
templateUrl: './summary-portal-items.component.html',
24-
styleUrls: ['./summary-portal-items.component.scss'],
25-
imports: [
26-
NgFor,
27-
NgIf,
28-
PanelArrayItemComponent,
29-
SummaryDividerComponent,
30-
MatButton,
31-
LowerCasePipe,
32-
NgClass,
33-
JsonPipe,
34-
HasSelectedItemsPipe,
35-
TertiaryButtonComponent,
36-
FilterLimitButtonComponent,
37-
MatCheckbox
38-
]
21+
@Component({
22+
selector: 'app-summary-portal-items',
23+
templateUrl: './summary-portal-items.component.html',
24+
styleUrls: ['./summary-portal-items.component.scss'],
25+
imports: [
26+
NgFor,
27+
NgIf,
28+
PanelArrayItemComponent,
29+
SummaryDividerComponent,
30+
MatButton,
31+
LowerCasePipe,
32+
NgClass,
33+
JsonPipe,
34+
HasSelectedItemsPipe,
35+
TertiaryButtonComponent,
36+
FilterLimitButtonComponent,
37+
MatCheckbox
38+
]
3939
})
4040

4141
export class SummaryPortalItemsComponent implements OnInit, OnChanges {
@@ -57,6 +57,8 @@ export class SummaryPortalItemsComponent implements OnInit, OnChanges {
5757
showOnlyPeerReviewed = $localize`:@@showOnlyPeerReviewed:Näytä vain vertaisarvioidut`;
5858
noPeerReviewedPublications = $localize`:@@noPeerReviewedPublications:Ei vertaisarvioituja julkaisuja`;
5959

60+
publicationYearMissing = $localize`:@@publicationYearMissing:Julkaisuvuosi puuttuuu`;
61+
6062
showMorePrefix = $localize`:@@showAll:Näytä kaikki`;
6163
showLessPrefix = $localize`:@@showLess:Näytä vähemmän`;
6264

@@ -91,11 +93,25 @@ export class SummaryPortalItemsComponent implements OnInit, OnChanges {
9193
}
9294

9395
comparePublicationYearsPublications(a, b) {
96+
if (a.publicationYear === undefined) {
97+
a.publicationYear = 0;
98+
}
99+
if (b.publicationYear === undefined) {
100+
b.publicationYear = 0;
101+
}
94102
return a.publicationYear - b.publicationYear;
95103
}
96104

97105
comparePublicationYearsDatasetOrFunding(a, b) {
98-
return a.year - b.year;
106+
let tempA = a.year;
107+
let tempB = b.year;
108+
if (tempA === undefined) {
109+
tempA = 0;
110+
}
111+
if (tempB === undefined) {
112+
tempB = 0;
113+
}
114+
return tempA - tempB;
99115
}
100116

101117
arrangeOpenPublicationsFirst(a, b) {

0 commit comments

Comments
 (0)