-
check_circle
-
-
{{ entry.value }}
+ >
+
check_circle
+
+ {{ domain.value }}
+
-
+
+
+
diff --git a/src/app/cdk/side-bar/side-bar/side-bar.component.scss b/src/app/cdk/side-bar/side-bar/side-bar.component.scss
index 92b966037..01feb144a 100644
--- a/src/app/cdk/side-bar/side-bar/side-bar.component.scss
+++ b/src/app/cdk/side-bar/side-bar/side-bar.component.scss
@@ -47,6 +47,11 @@ hr {
min-width: 24px;
font-size: 24px;
margin-right: 8px;
+ display: flex;
+ justify-content: center;
+ img {
+ width: 20px;
+ }
}
.last-public-email-or-domain {
@@ -69,6 +74,6 @@ hr {
padding-bottom: 0;
}
-.double-app-panel-data {
- padding-bottom: 8px;
+.email-domain-source {
+ margin-left: 32px;
}
diff --git a/src/app/cdk/side-bar/side-bar/side-bar.component.ts b/src/app/cdk/side-bar/side-bar/side-bar.component.ts
index 1ee7eba54..439819c95 100644
--- a/src/app/cdk/side-bar/side-bar/side-bar.component.ts
+++ b/src/app/cdk/side-bar/side-bar/side-bar.component.ts
@@ -44,6 +44,8 @@ export class SideBarComponent implements OnInit, OnDestroy {
labelManageYourKeyword = $localize`:"@@record.labelManageYourKeyword:Manage your keywords`
labelManageYourCountries = $localize`:"@@record.labelManageYourCountries:Manage your countries`
labelManageYourPersonalIds = $localize`:"@@record.labelManageYourPersonalIds:Manage your personalIds`
+ selfAssertedSource = $localize`:@@record.selfAssertedSource:Self-asserted source`
+ orcidEmailValidation = $localize`:@@side-bar.orcidEmailValidation:ORCID email validation`
$destroy: Subject
= new Subject()
diff --git a/src/app/core/record-emails/record-emails.service.ts b/src/app/core/record-emails/record-emails.service.ts
index d79a75bad..f289746c5 100644
--- a/src/app/core/record-emails/record-emails.service.ts
+++ b/src/app/core/record-emails/record-emails.service.ts
@@ -18,6 +18,7 @@ import { environment } from 'src/environments/environment'
import { ErrorHandlerService } from '../error-handler/error-handler.service'
import { RecordPublicSideBarService } from '../record-public-side-bar/record-public-side-bar.service'
+import { setProfessionalEmails } from '../utils'
@Injectable({
providedIn: 'root',
@@ -59,16 +60,10 @@ export class RecordEmailsService {
.pipe(
retry(3),
catchError((error) => this._errorHandler.handleError(error)),
- catchError((error) => of({ emails: [] })),
+ catchError(() => of({ emails: [] })),
map((value: EmailsEndpoint) => {
value.emails.sort(this.sortByEmailCreationDate)
- value.emailDomains.forEach((domain) => {
- value.emails.forEach((email) => {
- if (email.value.includes(domain.value)) {
- email.professionalEmail = true
- }
- })
- })
+ value = setProfessionalEmails(value)
return value
}),
tap((value) => {
diff --git a/src/app/core/record-public-side-bar/record-public-side-bar.service.ts b/src/app/core/record-public-side-bar/record-public-side-bar.service.ts
index 5bf405ef3..34215ba1e 100644
--- a/src/app/core/record-public-side-bar/record-public-side-bar.service.ts
+++ b/src/app/core/record-public-side-bar/record-public-side-bar.service.ts
@@ -9,6 +9,7 @@ import {
} from 'src/app/types/record.local'
import { environment } from 'src/environments/environment'
import { ErrorHandlerService } from '../error-handler/error-handler.service'
+import { setProfessionalEmails } from '../utils'
@Injectable({
providedIn: 'root',
@@ -54,8 +55,11 @@ export class RecordPublicSideBarService {
.pipe(
retry(3),
catchError((error) => this._errorHandler.handleError(error)),
- catchError((error) => of({} as SideBarPublicUserRecord)),
- tap((value) => this.$SideBarPublicUserRecordSubject.next(value))
+ catchError(() => of({} as SideBarPublicUserRecord)),
+ tap((record) => {
+ record.emails = setProfessionalEmails(record.emails)
+ this.$SideBarPublicUserRecordSubject.next(record)
+ })
)
} else {
of({})
diff --git a/src/app/core/utils.ts b/src/app/core/utils.ts
new file mode 100644
index 000000000..38d21e96b
--- /dev/null
+++ b/src/app/core/utils.ts
@@ -0,0 +1,14 @@
+import { EmailsEndpoint } from '../types'
+
+export const setProfessionalEmails = (
+ emails: EmailsEndpoint
+): EmailsEndpoint => {
+ emails.emailDomains.forEach((domain) => {
+ emails.emails.forEach((email) => {
+ if (email.value.includes(domain.value)) {
+ email.professionalEmail = true
+ }
+ })
+ })
+ return emails
+}