diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 90da93795..22cf04d4b 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -62,10 +62,13 @@ export class AppComponent implements OnInit { } private showEmailDialog() { + const unverifiedEmailsData = this.unverifiedEmails(); this.customDialogService.open(ConfirmEmailComponent, { - header: 'home.confirmEmail.title', + header: unverifiedEmailsData[0].isMerge + ? 'home.confirmEmail.isMerge.title' + : 'home.confirmEmail.isNotMerge.title', width: '448px', - data: this.unverifiedEmails(), + data: unverifiedEmailsData, }); } } diff --git a/src/app/features/registry/components/registry-revisions/registry-revisions.component.ts b/src/app/features/registry/components/registry-revisions/registry-revisions.component.ts index be870a199..52f1d27f0 100644 --- a/src/app/features/registry/components/registry-revisions/registry-revisions.component.ts +++ b/src/app/features/registry/components/registry-revisions/registry-revisions.component.ts @@ -43,7 +43,7 @@ export class RegistryRevisionsComponent { schemaResponses = this.isModeration() ? schemaResponses - : schemaResponses.filter((r) => r.reviewsState === RevisionReviewStates.Approved || r.isOriginalResponse); + : schemaResponses.filter((r) => r.reviewsState === RevisionReviewStates.Approved); return schemaResponses.map((response, index) => { const onlyOne = schemaResponses.length === 1; diff --git a/src/app/features/registry/components/registry-statuses/registry-statuses.component.html b/src/app/features/registry/components/registry-statuses/registry-statuses.component.html index 04f31e1d1..eee19584f 100644 --- a/src/app/features/registry/components/registry-statuses/registry-statuses.component.html +++ b/src/app/features/registry/components/registry-statuses/registry-statuses.component.html @@ -11,7 +11,7 @@

{{ 'registry.overview.statuses.' + registry()?.status + {{ 'registry.overview.statuses.' + registry()?.status + '.long' - | translate: { embargoEndDate: embargoEndDate, email: supportEmail } + | translate: { embargoEndDate: embargoEndDate } }} diff --git a/src/app/features/registry/components/registry-statuses/registry-statuses.component.ts b/src/app/features/registry/components/registry-statuses/registry-statuses.component.ts index 94d0b32da..0b179c285 100644 --- a/src/app/features/registry/components/registry-statuses/registry-statuses.component.ts +++ b/src/app/features/registry/components/registry-statuses/registry-statuses.component.ts @@ -8,7 +8,6 @@ import { Button } from 'primeng/button'; import { ChangeDetectionStrategy, Component, computed, HostBinding, inject, input } from '@angular/core'; import { RouterLink } from '@angular/router'; -import { ENVIRONMENT } from '@core/provider/environment.provider'; import { RegistrationReviewStates, RegistryStatus, RevisionReviewStates } from '@osf/shared/enums'; import { CustomConfirmationService, CustomDialogService } from '@osf/shared/services'; @@ -26,9 +25,6 @@ import { WithdrawDialogComponent } from '../withdraw-dialog/withdraw-dialog.comp export class RegistryStatusesComponent { @HostBinding('class') classes = 'flex-1 flex'; private readonly customDialogService = inject(CustomDialogService); - private readonly environment = inject(ENVIRONMENT); - - readonly supportEmail = this.environment.supportEmail; registry = input.required(); canEdit = input(false); diff --git a/src/app/shared/components/confirm-email/confirm-email.component.html b/src/app/shared/components/confirm-email/confirm-email.component.html index 7a52115e1..694a8d666 100644 --- a/src/app/shared/components/confirm-email/confirm-email.component.html +++ b/src/app/shared/components/confirm-email/confirm-email.component.html @@ -1,9 +1,17 @@
@if (!isSubmitting()) {

- {{ 'home.confirmEmail.description' | translate }} + {{ + email.isMerge + ? ('home.confirmEmail.isMerge.description' | translate) + : ('home.confirmEmail.isNotMerge.description' | translate) + }} {{ email.emailAddress }} - {{ 'home.confirmEmail.description2' | translate }} + {{ + email.isMerge + ? ('home.confirmEmail.isMerge.description2' | translate) + : ('home.confirmEmail.isNotMerge.description2' | translate) + }}

diff --git a/src/app/shared/constants/registration-statuses.ts b/src/app/shared/constants/registration-statuses.ts index f57867033..156d7a693 100644 --- a/src/app/shared/constants/registration-statuses.ts +++ b/src/app/shared/constants/registration-statuses.ts @@ -22,5 +22,4 @@ export const RegistryStatusMap: Record = { [RegistryStatus.PendingModeration]: { label: 'shared.statuses.pendingModeration', severity: 'warn' }, [RegistryStatus.Withdrawn]: { label: 'shared.statuses.withdrawn', severity: 'danger' }, [RegistryStatus.UpdatePendingApproval]: { label: 'shared.statuses.updatePendingApproval', severity: 'warn' }, - [RegistryStatus.InitialApproved]: { label: 'shared.statuses.initialApproved', severity: 'warn' }, }; diff --git a/src/app/shared/enums/registry-status.enum.ts b/src/app/shared/enums/registry-status.enum.ts index 003f36295..86d2aef10 100644 --- a/src/app/shared/enums/registry-status.enum.ts +++ b/src/app/shared/enums/registry-status.enum.ts @@ -13,5 +13,4 @@ export enum RegistryStatus { PendingModeration = 'pendingModeration', Withdrawn = 'withdrawn', UpdatePendingApproval = 'updatePendingApproval', - InitialApproved = 'initialApproved', } diff --git a/src/app/shared/mappers/registration/map-registry-status.mapper.ts b/src/app/shared/mappers/registration/map-registry-status.mapper.ts index 7761172e4..80e21a2e1 100644 --- a/src/app/shared/mappers/registration/map-registry-status.mapper.ts +++ b/src/app/shared/mappers/registration/map-registry-status.mapper.ts @@ -18,11 +18,6 @@ export function MapRegistryStatus( registry.reviews_state === RegistrationReviewStates.Accepted ) { return RegistryStatus.UpdatePendingApproval; - } else if ( - registry.reviews_state === RegistrationReviewStates.Pending && - registry.revision_state === RevisionReviewStates.RevisionPendingModeration - ) { - return RegistryStatus.Pending; } else if (registry.revision_state === RevisionReviewStates.Unapproved) { return RegistryStatus.Unapproved; } else if (registry.reviews_state === RegistrationReviewStates.PendingWithdrawRequest) { @@ -39,11 +34,6 @@ export function MapRegistryStatus( return RegistryStatus.PendingWithdraw; } else if (registry.reviews_state === RegistrationReviewStates.Withdrawn) { return RegistryStatus.Withdrawn; - } else if ( - registry.reviews_state === RegistrationReviewStates.Initial && - registry.revision_state === RevisionReviewStates.Approved - ) { - return RegistryStatus.InitialApproved; } else { return RegistryStatus.None; } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 355bd04eb..263722d6b 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -388,9 +388,16 @@ } }, "confirmEmail": { - "title": "Add alternative email", - "description": "Do you want to add ", - "description2": "to your profile ?", + "isMerge": { + "title": "Merge account", + "description": "Would you like to merge ", + "description2": "into your account? This action is irreversible." + }, + "isNotMerge": { + "title": "Add alternative email", + "description": "Do you want to add ", + "description2": "to your profile ?" + }, "goToEmails": "Add email", "emailNotAdded": "{{name}} has not been added to your account.", "emailVerified": "{{name}} has been added to your account." @@ -2543,11 +2550,6 @@ "text": "Update pending", "short": "Update pending approval", "long": "This registration has an update that is waiting for approval from its contributors. Updates will be made available once approved." - }, - "initialApproved": { - "text": "Pending", - "short": "Pending admin contributor approval", - "long": "This registration is awaiting approval by all admin contributors or after 48 hours has passed. An email will notify all registration contributors of the decision. If the registration is pending after 48 hours has passed, contact support at {{email}}." } }, "metadata": { @@ -2665,8 +2667,7 @@ "inProgress": "Update in progress", "pendingModeration": "Pending moderation", "withdrawn": "Withdrawn", - "updatePendingApproval": "Update pending approval", - "initialApproved": "Pending" + "updatePendingApproval": "Update pending approval" } }, "resourceCard": {