-
- Email frequency
+
+ Notification email address
class="margin-bottom-8 row"
i18n="@@account.administrativeChangesSuchAs"
>
- Adminstrative changes, such as being made a trusted individual
+ Administrative changes, such as being made a trusted individual
{
let component: SettingsDefaultsEmailFrequencyComponent
@@ -30,10 +32,15 @@ describe('SettingsDefaultsEmailFrequencyComponent', () => {
UntypedFormBuilder,
PlatformInfoService,
ErrorHandlerService,
- UserInfoService,
SnackbarService,
MatSnackBar,
Overlay,
+ {
+ provide: RecordService,
+ useValue: {
+ getRecord: () => of({}),
+ },
+ },
],
}).compileComponents()
})
diff --git a/src/app/account-settings/components/settings-defaults-email-frequency/settings-defaults-email-frequency.component.ts b/src/app/account-settings/components/settings-defaults-email-frequency/settings-defaults-email-frequency.component.ts
index 689960afa..b1bd1e0c6 100644
--- a/src/app/account-settings/components/settings-defaults-email-frequency/settings-defaults-email-frequency.component.ts
+++ b/src/app/account-settings/components/settings-defaults-email-frequency/settings-defaults-email-frequency.component.ts
@@ -17,6 +17,7 @@ import {
import { MatLegacyDialog } from '@angular/material/legacy-dialog'
import { ModalEmailComponent } from 'src/app/cdk/side-bar/modals/modal-email/modal-email.component'
import { UserInfoService } from 'src/app/core/user-info/user-info.service'
+import { RecordService } from 'src/app/core/record/record.service'
@Component({
selector: 'app-settings-defaults-email-frequency',
templateUrl: './settings-defaults-email-frequency.component.html',
@@ -41,7 +42,7 @@ export class SettingsDefaultsEmailFrequencyComponent
emailFrequenciesValues = EmailFrequenciesValues
form: UntypedFormGroup
primaryEmail: string
- primaryEmailVerified: string
+ primaryEmailVerified: boolean
arialabelSetTheFrequency = $localize`:@@account.setTheFrequency:Set the frequency for update notifications`
ariaLabelSetTheFrequencyAdministrative = $localize`:@@account.setTheFrequencyAdministrative:Set the frequency for administrative change notifications`
@@ -53,15 +54,12 @@ export class SettingsDefaultsEmailFrequencyComponent
private _fb: UntypedFormBuilder,
private _emailFrequency: AccountDefaultEmailFrequenciesService,
private _dialog: MatLegacyDialog,
- private _userInfoService: UserInfoService
+ private _record: RecordService
) {}
ngOnInit(): void {
this.loading.next(true)
- this._userInfoService.getUserInfo().subscribe((value) => {
- this.primaryEmail = value.PRIMARY_EMAIL
- this.primaryEmailVerified = value.IS_PRIMARY_EMAIL_VERIFIED
- })
+
this._emailFrequency.get().subscribe((value) => {
this.loading.next(false)
this.form = this._fb.group({
@@ -113,7 +111,16 @@ export class SettingsDefaultsEmailFrequencyComponent
.subscribe((platform) => {
this.isMobile = platform.columns4 || platform.columns8
})
+
+ this._record
+ .getRecord()
+ .pipe(takeUntil(this.$destroy))
+ .subscribe((userRecord) => {
+ this.primaryEmail = userRecord.emails.emails.find((email) => email.primary).value
+ this.primaryEmailVerified = userRecord.emails.emails.find((email) => email.primary).verified
+ })
}
+
openEmailModal() {
return this._dialog
diff --git a/src/app/account-settings/components/settings-defaults/settings-defaults.component.ts b/src/app/account-settings/components/settings-defaults/settings-defaults.component.ts
index 6d8b966b2..9ad40233d 100644
--- a/src/app/account-settings/components/settings-defaults/settings-defaults.component.ts
+++ b/src/app/account-settings/components/settings-defaults/settings-defaults.component.ts
@@ -13,7 +13,7 @@ export class SettingsDefaultsComponent implements OnInit {
visibilityFrequencyLoading = false
visibilityExpanded = false
languageExpanded = false
- titleEmailFrequency = $localize`:@@account.emailFrequency:Notification email frequency`
+ titleEmailFrequency = $localize`:@@account.notificationEmailAddress:Notification email frequency`
titleLanguage = $localize`:@@account.language:Language`
titleVisibility = $localize`:@@account.visibility:Visibility`
diff --git a/src/locale/properties/account/account.en.properties b/src/locale/properties/account/account.en.properties
index 2c6818d74..24096d805 100644
--- a/src/locale/properties/account/account.en.properties
+++ b/src/locale/properties/account/account.en.properties
@@ -198,7 +198,7 @@ account.scopePathType.personUpdate=Add/update information about you (country, ke
account.scopePathType.readLimited=Read your information with visibility set to Trusted Parties
account.scopePathType.readPublic=Read public info only
account.scopePathType.webhook=Notifies Application if there are changes to your record
-account.notifications=Notifications keep you up-to-date with activity in your ORCID record. Updates are automatically sent to your ORCID inbox but you can also have them sent to you by email. You can choose the kind of notifications you wish to receive by email and how often you want to receive them
+account.notifications=Notifications keep you up-to-date with activity in your ORCID record. Updates are automatically sent to your ORCID inbox but you can also have them sent to you by email. You can choose the kind of notifications you wish to receive by email and how often you want to receive them.
account.inAdditionToTheOptional=In addition to the optional account and record notifications, we may occasionally send you emails with service messages relating to your ORCID account. As the information in these emails may affect your privacy settings and the functioning of your ORCID account, you cannot opt-out of these service messages per our
account.notificationEmailAddress=Notification email address
account.yourOrcidNotification=Your ORCID notification emails will be sent to:
@@ -206,11 +206,10 @@ account.unverifiedEmailAddress=Unverified email address
account.verifiedEmailAddress=Verified email address
account.manageYourEmails=Manage your emails
account.howOftenShouldWeSend=How often should we send you ORCID notification emails about:
-account.administrativeChangesSuchAs=Adminstrative changes, such as being made a trusted individual
+account.administrativeChangesSuchAs=Administrative changes, such as being made a trusted individual
account.tipsAndFeatures=Tips & features email
account.idLikeToReceiveTheOrcidTips=I’d like to receive the ORCID tips & features email
account.privacypolicy=Privacy Policy
account.setTheFrequency=Set the frequency for update notifications
account.setTheFrequencyAdministrative=Set the frequency for administrative change notifications
account.setTheFrequencyMember=Set the frequency for permission request notifications
-=