From 73df25b2f48c57e9cdbfa42831fe0286ccff9cff Mon Sep 17 00:00:00 2001 From: Camelia Dumitru Date: Sun, 8 Jun 2025 15:16:36 +0100 Subject: [PATCH 1/2] Fixed the layout for orcid integration mvp notification in the inbox --- .../notification-permission.component.html | 30 ++++++++++++++++--- .../notification-permission.component.ts | 7 +++++ .../properties/inbox/inbox.en.properties | 4 +++ .../properties/inbox/inbox.lr.properties | 4 +++ .../properties/inbox/inbox.rl.properties | 4 +++ .../properties/inbox/inbox.xx.properties | 4 +++ 6 files changed, 49 insertions(+), 4 deletions(-) diff --git a/src/app/inbox/components/notification-permission/notification-permission.component.html b/src/app/inbox/components/notification-permission/notification-permission.component.html index 2c98b59455..2e419fe7f5 100644 --- a/src/app/inbox/components/notification-permission/notification-permission.component.html +++ b/src/app/inbox/components/notification-permission/notification-permission.component.html @@ -1,6 +1,9 @@ -
{{ notification?.notificationIntro }}
+
+You can benefit from automatic updates to your record. Based on your verified email domains we have found an ORCID integration for {{ orcidIntegrationMemberName }}. Connecting with this integration will allow {{ orcidIntegrationMemberName }} to automatically add validated information to your ORCID record. +
+
{{ notification?.notificationIntro }}
-
+
{{ notification?.source.sourceName.content }} would like your permission to interact with your ORCID Record as a trusted @@ -24,7 +27,7 @@
-
+
-
+ + \ No newline at end of file diff --git a/src/app/inbox/components/notification-permission/notification-permission.component.ts b/src/app/inbox/components/notification-permission/notification-permission.component.ts index a41128c96f..39fc751a59 100644 --- a/src/app/inbox/components/notification-permission/notification-permission.component.ts +++ b/src/app/inbox/components/notification-permission/notification-permission.component.ts @@ -16,6 +16,9 @@ import { InboxService } from '../../../core/inbox/inbox.service' export class NotificationPermissionComponent implements OnInit { @Input() notification: InboxNotificationPermission itemsByType: { type: string; items: Item[] }[] + isOrcidIntegration: boolean = false + orcidIntegrationLink: string + orcidIntegrationMemberName: string constructor( @Inject(WINDOW) private window: Window, @@ -23,6 +26,10 @@ export class NotificationPermissionComponent implements OnInit { ) {} ngOnInit(): void { + if(this.notification?.notificationIntro?.includes('::')) { + [this.orcidIntegrationMemberName,this.orcidIntegrationLink] = this.notification.notificationIntro.split('::') + this.isOrcidIntegration = true + } this.itemsByType = chain(this.notification?.items.items) .groupBy('itemType') .map((value, key) => ({ type: key, items: value })) diff --git a/src/locale/properties/inbox/inbox.en.properties b/src/locale/properties/inbox/inbox.en.properties index c86db3c5dd..a29603fc04 100644 --- a/src/locale/properties/inbox/inbox.en.properties +++ b/src/locale/properties/inbox/inbox.en.properties @@ -45,3 +45,7 @@ inbox.youDontHaveUnarchived=You don't have any unarchived notifications right no inbox.youDontHave=You don’t have any notifications yet. inbox.archiveWithout=Archive without granting permissions inbox.professionalActivities=Professional activities +inbox.connectWith=Connect with +inbox.youCanBenefitFromAutomatic=You can benefit from automatic updates to your record. Based on your verified email domains we have found an ORCID integration for +inbox.connectingWithThisIntegrationWillAllow=Connecting with this integration will allow +inbox.toAutomaticallyAddValidatedInformation=to automatically add validated information to your ORCID record. This will save you time and effort when maintaining your record, and help make sure it stays up-to-date. \ No newline at end of file diff --git a/src/locale/properties/inbox/inbox.lr.properties b/src/locale/properties/inbox/inbox.lr.properties index eaa8fad452..38885f4bd7 100644 --- a/src/locale/properties/inbox/inbox.lr.properties +++ b/src/locale/properties/inbox/inbox.lr.properties @@ -49,3 +49,7 @@ inbox.service=LR inbox.connectingYour=LR inbox.archiveWithout=LR inbox.professionalActivities=LR +inbox.connectWith=LR +inbox.youCanBenefitFromAutomatic=LR +inbox.connectingWithThisIntegrationWillAllow=LR +inbox.toAutomaticallyAddValidatedInformation=LR \ No newline at end of file diff --git a/src/locale/properties/inbox/inbox.rl.properties b/src/locale/properties/inbox/inbox.rl.properties index 0ecbf8d135..c93b480e0a 100644 --- a/src/locale/properties/inbox/inbox.rl.properties +++ b/src/locale/properties/inbox/inbox.rl.properties @@ -49,3 +49,7 @@ inbox.service=RL inbox.connectingYour=RL inbox.archiveWithout=RL inbox.professionalActivities=RL +inbox.connectWith=RL +inbox.youCanBenefitFromAutomatic=RL +inbox.connectingWithThisIntegrationWillAllow=RL +inbox.toAutomaticallyAddValidatedInformation=RL diff --git a/src/locale/properties/inbox/inbox.xx.properties b/src/locale/properties/inbox/inbox.xx.properties index b363c3c748..36ac24e1e8 100644 --- a/src/locale/properties/inbox/inbox.xx.properties +++ b/src/locale/properties/inbox/inbox.xx.properties @@ -49,3 +49,7 @@ inbox.service=X inbox.connectingYour=X inbox.archiveWithout=X inbox.professionalActivities=X +inbox.connectWith=X +inbox.youCanBenefitFromAutomatic=X +inbox.connectingWithThisIntegrationWillAllow=X +inbox.toAutomaticallyAddValidatedInformation=X From 80774a00a163b31e589ec0ecd854c5e0a19882de Mon Sep 17 00:00:00 2001 From: Camelia Dumitru Date: Sun, 8 Jun 2025 15:59:33 +0100 Subject: [PATCH 2/2] Fixed the failing test. --- .../notification-permission.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/inbox/components/notification-permission/notification-permission.component.html b/src/app/inbox/components/notification-permission/notification-permission.component.html index 2e419fe7f5..9c47b99270 100644 --- a/src/app/inbox/components/notification-permission/notification-permission.component.html +++ b/src/app/inbox/components/notification-permission/notification-permission.component.html @@ -1,5 +1,5 @@
-You can benefit from automatic updates to your record. Based on your verified email domains we have found an ORCID integration for {{ orcidIntegrationMemberName }}. Connecting with this integration will allow {{ orcidIntegrationMemberName }} to automatically add validated information to your ORCID record. +You can benefit from automatic updates to your record. Based on your verified email domains we have found an ORCID integration for {{ orcidIntegrationMemberName }}. Connecting with this integration will allow {{ orcidIntegrationMemberName }} to automatically add validated information to your ORCID record. This will save you time and effort when maintaining your record, and help make sure it stays up-to-date.
{{ notification?.notificationIntro }}