From bf7cd14c815c2c311e61306f8389f96d358df282 Mon Sep 17 00:00:00 2001 From: nsemets Date: Thu, 11 Dec 2025 17:03:56 +0200 Subject: [PATCH 1/2] fix(styles): fixed styles --- .../overview/project-overview.component.html | 60 ++++++++++--------- ...egistration-recent-activity.component.html | 2 +- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/app/features/project/overview/project-overview.component.html b/src/app/features/project/overview/project-overview.component.html index 28942c854..936f8ecc8 100644 --- a/src/app/features/project/overview/project-overview.component.html +++ b/src/app/features/project/overview/project-overview.component.html @@ -23,7 +23,7 @@ } -
+
@if (isCollectionsRoute()) { } -
- @if (isWikiEnabled()) { - - } - - +
+
+ @if (isWikiEnabled()) { + + } - @if (parentProject()) { - - } - + @if (parentProject()) { + + } - @if (!hasViewOnly()) { - - } + - @if (configuredCitationAddons().length) { - @for (addon of configuredCitationAddons(); track addon.id) { - + @if (!hasViewOnly()) { + } - } - -
+ @if (configuredCitationAddons().length) { + @for (addon of configuredCitationAddons(); track addon.id) { + + } + } + + +
-
- +
+ +
} @else { diff --git a/src/app/features/registry/pages/registration-recent-activity/registration-recent-activity.component.html b/src/app/features/registry/pages/registration-recent-activity/registration-recent-activity.component.html index 8934d6c84..54530afe5 100644 --- a/src/app/features/registry/pages/registration-recent-activity/registration-recent-activity.component.html +++ b/src/app/features/registry/pages/registration-recent-activity/registration-recent-activity.component.html @@ -1,4 +1,4 @@ -
+

{{ 'project.overview.recentActivity.title' | translate }}

From 5cc5d508571487b157526d9e8844d254d352a156 Mon Sep 17 00:00:00 2001 From: nsemets Date: Thu, 11 Dec 2025 17:23:23 +0200 Subject: [PATCH 2/2] fix(collections): fixed status for collection --- .../metadata-collection-item.component.html | 7 ++++--- .../overview-collections.component.html | 4 ++-- .../collection-submission-status.util.ts | 19 +++++++++++++------ .../pipes/collection-status-severity.pipe.ts | 3 ++- src/assets/i18n/en.json | 3 ++- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/app/features/metadata/components/metadata-collection-item/metadata-collection-item.component.html b/src/app/features/metadata/components/metadata-collection-item/metadata-collection-item.component.html index f851bd77a..cf05872c9 100644 --- a/src/app/features/metadata/components/metadata-collection-item/metadata-collection-item.component.html +++ b/src/app/features/metadata/components/metadata-collection-item/metadata-collection-item.component.html @@ -16,9 +16,10 @@ }
-
- @let status = submission().reviewsState; - +
+ @let status = submission().reviewsState | collectionStatusSeverity; + +
@if (showAttributes()) { diff --git a/src/app/features/project/overview/components/overview-collections/overview-collections.component.html b/src/app/features/project/overview/components/overview-collections/overview-collections.component.html index 390df488d..5a18e2d72 100644 --- a/src/app/features/project/overview/components/overview-collections/overview-collections.component.html +++ b/src/app/features/project/overview/components/overview-collections/overview-collections.component.html @@ -22,9 +22,9 @@

{{ 'project.overview.metadata.collection' | translate }}

[label]="submission.collectionTitle" > - @let status = submission.reviewsState; + @let status = submission.reviewsState | collectionStatusSeverity; - +
diff --git a/src/app/shared/helpers/collection-submission-status.util.ts b/src/app/shared/helpers/collection-submission-status.util.ts index 27a3ae589..7e479965f 100644 --- a/src/app/shared/helpers/collection-submission-status.util.ts +++ b/src/app/shared/helpers/collection-submission-status.util.ts @@ -1,11 +1,18 @@ import { CollectionSubmissionReviewState } from '@osf/shared/enums/collection-submission-review-state.enum'; +import { CustomOption } from '../models/select-option.model'; import { SeverityType } from '../models/severity.type'; -export const COLLECTION_SUBMISSION_STATUS_SEVERITY: Record = { - [CollectionSubmissionReviewState.Accepted]: 'success', - [CollectionSubmissionReviewState.Rejected]: 'danger', - [CollectionSubmissionReviewState.Pending]: 'warn', - [CollectionSubmissionReviewState.InProgress]: 'warn', - [CollectionSubmissionReviewState.Removed]: 'secondary', +export const COLLECTION_SUBMISSION_STATUS_SEVERITY: Record< + CollectionSubmissionReviewState, + CustomOption +> = { + [CollectionSubmissionReviewState.Accepted]: { label: 'moderation.submissionReviewStatus.approved', value: 'success' }, + [CollectionSubmissionReviewState.Rejected]: { label: 'moderation.submissionReviewStatus.rejected', value: 'danger' }, + [CollectionSubmissionReviewState.Pending]: { label: 'moderation.submissionReviewStatus.pending', value: 'warn' }, + [CollectionSubmissionReviewState.InProgress]: { + label: 'moderation.submissionReviewStatus.inProgress', + value: 'warn', + }, + [CollectionSubmissionReviewState.Removed]: { label: 'moderation.submissionReviewStatus.removed', value: 'secondary' }, }; diff --git a/src/app/shared/pipes/collection-status-severity.pipe.ts b/src/app/shared/pipes/collection-status-severity.pipe.ts index 57dc32172..89132aa0e 100644 --- a/src/app/shared/pipes/collection-status-severity.pipe.ts +++ b/src/app/shared/pipes/collection-status-severity.pipe.ts @@ -2,13 +2,14 @@ import { Pipe, PipeTransform } from '@angular/core'; import { CollectionSubmissionReviewState } from '../enums/collection-submission-review-state.enum'; import { COLLECTION_SUBMISSION_STATUS_SEVERITY } from '../helpers/collection-submission-status.util'; +import { CustomOption } from '../models/select-option.model'; import { SeverityType } from '../models/severity.type'; @Pipe({ name: 'collectionStatusSeverity', }) export class CollectionStatusSeverityPipe implements PipeTransform { - transform(status: CollectionSubmissionReviewState): SeverityType { + transform(status: CollectionSubmissionReviewState): CustomOption { return COLLECTION_SUBMISSION_STATUS_SEVERITY[status]; } } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 4d22f4549..0934dc437 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -1468,7 +1468,8 @@ "pendingUpdates": "Pending Updates", "pendingWithdrawal": "Pending Withdrawal", "approved": "Approved", - "declined": "Declined" + "declined": "Declined", + "inProgress": "In Progress" }, "makeDecision": { "header": "Make decision",