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 d63e44fad..f1c9bbeb8 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 @@ -223,9 +223,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 5e7b617d2..7c9090df4 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -3064,6 +3064,7 @@ "registration_approved_no_user": "Registration of {{node}} was approved", "registration_cancelled": "{{user}} cancelled a registration of {{node}}", "registration_initiated": "{{user}} initiated a registration of {{node}}", + "registration_date_updated": "An OSF Support Team member updated the registration date of {{node}}", "resource_identifier_added": "{{user}} has added a Resource to Registration {{node}}", "resource_identifier_removed": "{{user}} has removed a Resource to Registration {{node}}", "resource_identifier_updated": "{{user}} has updated a Resource to Registration {{node}}",