Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3 class="font-normal">{{ 'registry.overview.statuses.' + registry()?.status +
<span>
{{
'registry.overview.statuses.' + registry()?.status + '.long'
| translate: { embargoEndDate: embargoEndDate, email: supportEmail }
| translate: { embargoEndDate: embargoEndDate }
}}
</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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<RegistryOverview | null>();
canEdit = input<boolean>(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<div class="flex flex-column gap-6">
@if (!isSubmitting()) {
<p class="font-normal">
{{ 'home.confirmEmail.description' | translate }}
{{
email.isMerge
? ('home.confirmEmail.isMerge.description' | translate)
: ('home.confirmEmail.isNotMerge.description' | translate)
}}
<span class="inline font-bold">{{ email.emailAddress }}</span>
{{ 'home.confirmEmail.description2' | translate }}
{{
email.isMerge
? ('home.confirmEmail.isMerge.description2' | translate)
: ('home.confirmEmail.isNotMerge.description2' | translate)
}}
</p>

<div class="flex w-full justify-content-center gap-2">
Expand Down
1 change: 0 additions & 1 deletion src/app/shared/constants/registration-statuses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ export const RegistryStatusMap: Record<RegistryStatus, StatusInfo> = {
[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' },
};
1 change: 0 additions & 1 deletion src/app/shared/enums/registry-status.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ export enum RegistryStatus {
PendingModeration = 'pendingModeration',
Withdrawn = 'withdrawn',
UpdatePendingApproval = 'updatePendingApproval',
InitialApproved = 'initialApproved',
}
10 changes: 0 additions & 10 deletions src/app/shared/mappers/registration/map-registry-status.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
Expand Down
21 changes: 11 additions & 10 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -2665,8 +2667,7 @@
"inProgress": "Update in progress",
"pendingModeration": "Pending moderation",
"withdrawn": "Withdrawn",
"updatePendingApproval": "Update pending approval",
"initialApproved": "Pending"
"updatePendingApproval": "Update pending approval"
}
},
"resourceCard": {
Expand Down
Loading