diff --git a/src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.html b/src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.html
index 750c68efb..2ab7923dd 100644
--- a/src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.html
+++ b/src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.html
@@ -4,6 +4,13 @@
} @else {
+ @if (summaryMetrics()?.reportYearmonth) {
+
+ {{ 'adminInstitutions.summary.lastUpdated' | translate }}:
+ {{ summaryMetrics()!.reportYearmonth + '-01' | date: 'MMMM d, y' }}
+
+ }
+
@for (item of statisticsData; track $index) {
diff --git a/src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.ts b/src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.ts
index 4d89b1140..ff831f118 100644
--- a/src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.ts
+++ b/src/app/features/admin-institutions/pages/institutions-summary/institutions-summary.component.ts
@@ -2,6 +2,7 @@ import { createDispatchMap, select } from '@ngxs/store';
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
+import { DatePipe } from '@angular/common';
import { ChangeDetectionStrategy, Component, effect, inject, OnInit, signal } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@@ -23,7 +24,14 @@ import {
@Component({
selector: 'osf-institutions-summary',
- imports: [StatisticCardComponent, LoadingSpinnerComponent, DoughnutChartComponent, BarChartComponent, TranslatePipe],
+ imports: [
+ StatisticCardComponent,
+ LoadingSpinnerComponent,
+ DoughnutChartComponent,
+ BarChartComponent,
+ TranslatePipe,
+ DatePipe,
+ ],
templateUrl: './institutions-summary.component.html',
styleUrl: './institutions-summary.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
diff --git a/src/app/features/preprints/store/preprint-stepper/preprint-stepper.state.ts b/src/app/features/preprints/store/preprint-stepper/preprint-stepper.state.ts
index b3b3559f8..d915e5782 100644
--- a/src/app/features/preprints/store/preprint-stepper/preprint-stepper.state.ts
+++ b/src/app/features/preprints/store/preprint-stepper/preprint-stepper.state.ts
@@ -172,9 +172,14 @@ export class PreprintStepperState {
ctx.setState(patch({ preprintFile: patch({ isLoading: true }) }));
- return this.fileService
- .updateFileContent(action.file, uploadedFile.links.upload)
- .pipe(switchMap(() => this.fileService.renameEntry(uploadedFile.links.upload, action.file.name, 'replace')));
+ return this.fileService.updateFileContent(action.file, uploadedFile.links.upload).pipe(
+ switchMap(() => {
+ if (uploadedFile.name !== action.file.name) {
+ return this.fileService.renameEntry(uploadedFile.links.upload, action.file.name, 'replace');
+ }
+ return EMPTY;
+ })
+ );
}
@Action(FetchPreprintPrimaryFile)
diff --git a/src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.spec.ts b/src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.spec.ts
index 7bf548355..76bfdb06a 100644
--- a/src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.spec.ts
+++ b/src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.spec.ts
@@ -178,8 +178,8 @@ describe('ProjectOverviewToolbarComponent', () => {
expect(component.ResourceType).toBe(ResourceType);
});
- it('should have resourceType set to Registration', () => {
- expect(component.resourceType).toBe(ResourceType.Registration);
+ it('should have resourceType set to Project', () => {
+ expect(component.resourceType).toBe(ResourceType.Project);
});
});
});
diff --git a/src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.ts b/src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.ts
index 2ef801f41..812e20ef2 100644
--- a/src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.ts
+++ b/src/app/features/project/overview/components/project-overview-toolbar/project-overview-toolbar.component.ts
@@ -66,7 +66,7 @@ export class ProjectOverviewToolbarComponent {
isPublic = signal(false);
isBookmarked = signal(false);
- resourceType = ResourceType.Registration;
+ resourceType = ResourceType.Project;
bookmarksCollectionId = select(BookmarksSelectors.getBookmarksCollectionId);
bookmarks = select(BookmarksSelectors.getBookmarks);
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index ba89a6abf..333c36e74 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -2836,6 +2836,7 @@
},
"summary": {
"title": "Summary",
+ "lastUpdated": "Last Updated",
"totalUsersByDepartment": "Total Users by Department",
"publicPrivateProjects": "Public vs Private Projects",
"publicEmbargoedRegistrations": "Public vs Embargoed Registrations",