From abc1547c72e95fb71d7a2d6b55d041b24d6dd5ff Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 21 Mar 2023 14:16:01 +0200 Subject: [PATCH 01/13] Update for production deploy --- src/app/openaireLibrary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 53400f7..ed19051 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 53400f774505b7461ba5773f3d2d40cfc7091e34 +Subproject commit ed19051fc063d97a34b7ee4601bc5fd68aac3baa From 6d18512491d22186bc43514d3c9575ffe7a00ef3 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 22 Mar 2023 17:56:50 +0200 Subject: [PATCH 02/13] Monitor page: Hide note in mobile. Change position of filters in mobile. --- src/app/monitor/monitor.component.html | 12 ++++++------ src/app/openaireLibrary | 2 +- src/assets/common-assets | 2 +- src/assets/monitor-dashboard-custom.less | 8 ++++++++ src/assets/openaire-theme | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/app/monitor/monitor.component.html b/src/app/monitor/monitor.component.html index 93ae81c..8dec924 100644 --- a/src/app/monitor/monitor.component.html +++ b/src/app/monitor/monitor.component.html @@ -37,7 +37,7 @@ -
+

{{stakeholder.name}}

@@ -112,12 +112,12 @@ --
+ class="uk-position-top-right uk-text-center uk-margin-small-top uk-margin-small-right uk-visible@m"> - - - + + +
@@ -213,7 +213,7 @@ [ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')">
+ class="uk-position-bottom-left uk-margin-left uk-margin-small-bottom uk-visible@m"> diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 4c19e65..d254318 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 4c19e65edb3db3b546eda029ea90a58298a1f0ad +Subproject commit d2543181e77d5577c4bd7ce2911515c5d4b3dbcd diff --git a/src/assets/common-assets b/src/assets/common-assets index 95c2b50..22728ec 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit 95c2b50a57696a80dd3dd376880f26cb21d65817 +Subproject commit 22728ec7de6c106bb4ede71e12a71cb061c6e8f8 diff --git a/src/assets/monitor-dashboard-custom.less b/src/assets/monitor-dashboard-custom.less index a522978..f96d4f6 100644 --- a/src/assets/monitor-dashboard-custom.less +++ b/src/assets/monitor-dashboard-custom.less @@ -56,6 +56,7 @@ /* Dashboard */ @dashboard-page-content-background: @monitor-dashboard-background; @dashboard-primary-background: @monitor-color; + @dashboard-menu-section-sublist-border: fade(@monitor-color, 30%); & #filters_icon .start { stop-color: @monitor-light-color; @@ -94,6 +95,13 @@ top: 400px !important; } +@media (max-width: @breakpoint-small-max) { + #filters_switcher_toggle { + top: unset !important; + bottom: 10vh; + } +} + /* Quick fix for svgs with a class that makes their opacity: 0.5*/ svg .a { opacity: 1 !important; diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index c4e2781..f264617 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit c4e2781acc42f281265a70d6cd75616cdd6fa762 +Subproject commit f264617e5ab356c4279ee1ef1819db434fec4fba From 3b8cf0e1298884c24c4879e862e7c053ceedae2c Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 22 Mar 2023 19:31:44 +0200 Subject: [PATCH 03/13] Update stakeholder if route is diff from user-info --- src/app/app.component.ts | 2 +- src/app/openaireLibrary | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c7c22d9..9d891f9 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -144,7 +144,7 @@ export class AppComponent implements OnInit, OnDestroy { } })); this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => { - this.updateStakeholder = true; + this.updateStakeholder = !this.router.url.includes('user-info'); if (user) { this.user = user; if (!this.notificationGroupsInitialized) { diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index ed19051..2b4835b 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit ed19051fc063d97a34b7ee4601bc5fd68aac3baa +Subproject commit 2b4835bd0dfaa19a65ab27da289f5a8877819a88 From 0440a5fbfa86e90cb2c99df155c8d0b61aa9c4cd Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 23 Mar 2023 09:19:36 +0200 Subject: [PATCH 04/13] Update library before deployment --- src/app/openaireLibrary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 2b4835b..4fa36bd 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 2b4835bd0dfaa19a65ab27da289f5a8877819a88 +Subproject commit 4fa36bdd43807c4755996ebc58c184dd421be091 From 9f9127ca912b913684e11e1454733662cfbaac43 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 23 Mar 2023 10:45:16 +0200 Subject: [PATCH 05/13] General: Fix error while initilizing form when stakeholder is changed. --- src/app/general/general.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/general/general.component.ts b/src/app/general/general.component.ts index fc3d9e2..03045f0 100644 --- a/src/app/general/general.component.ts +++ b/src/app/general/general.component.ts @@ -1,4 +1,4 @@ -import {Component, OnDestroy, OnInit, ViewChild} from "@angular/core"; +import {ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild} from "@angular/core"; import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"; import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder"; @@ -22,6 +22,7 @@ export class GeneralComponent implements OnInit, OnDestroy { @ViewChild('editStakeholderComponent') editStakeholderComponent: EditStakeholderComponent; constructor(private stakeholderService: StakeholderService, + private cdr: ChangeDetectorRef, private title: Title) { } @@ -29,6 +30,7 @@ export class GeneralComponent implements OnInit, OnDestroy { this.loading = true; this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { this.stakeholder = stakeholder; + this.cdr.detectChanges(); if(this.stakeholder) { this.title.setTitle(this.stakeholder.name + " | General"); let data = zip( From b9381c41cf61b24fe364768d46c4b3c1b5c19d0f Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 23 Mar 2023 12:24:11 +0200 Subject: [PATCH 06/13] Manage Stakeholders: Remove uikit event handler and use cancelEmitter of modal. Update UIkit to 3.12.2 --- package.json | 2 +- src/app/manageStakeholders/manageStakeholders.component.html | 5 ++--- src/app/manageStakeholders/manageStakeholders.component.ts | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c18590c..13ecf4c 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "rxjs": "^6.5.1", "ts-md5": "^1.2.0", "tslib": "^2.0.0", - "uikit": "3.12.0", + "uikit": "3.12.2", "zone.js": "~0.11.4" }, "devDependencies": { diff --git a/src/app/manageStakeholders/manageStakeholders.component.html b/src/app/manageStakeholders/manageStakeholders.component.html index 24dde5a..f4e66a5 100644 --- a/src/app/manageStakeholders/manageStakeholders.component.html +++ b/src/app/manageStakeholders/manageStakeholders.component.html @@ -118,9 +118,8 @@
-
diff --git a/src/app/manageStakeholders/manageStakeholders.component.ts b/src/app/manageStakeholders/manageStakeholders.component.ts index c954be2..47a3848 100644 --- a/src/app/manageStakeholders/manageStakeholders.component.ts +++ b/src/app/manageStakeholders/manageStakeholders.component.ts @@ -90,10 +90,6 @@ export class ManageStakeholdersComponent implements OnInit, OnDestroy { }, error => { this.loading = false; })); - - this.subscriptions.push(UIkit.util.on(document, 'hidden', '#edit_modal', (): void => { - this.editStakeholderComponent.removePhoto(); - })); } ngOnDestroy(): void { From 409f263479e5d30cda5c89876f6c0bc6d305b906 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 24 Mar 2023 17:15:41 +0200 Subject: [PATCH 07/13] Add notification configuration in order to works in mobile --- src/app/app.component.html | 6 +++--- src/app/app.component.ts | 34 +++++++++++++++++++++------------- src/app/openaireLibrary | 2 +- src/assets/common-assets | 2 +- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 6b0bc58..8b1bf09 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -6,7 +6,8 @@ [class.sidebar_mini]="!open && (hasSidebar || hasAdminMenu || hasInternalSidebar)" [class.sidebar_hover]="hover"> - +
@@ -15,8 +16,7 @@ - +
You are currently in a "Preview" mode. The current view of this dashboard may differ. diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 91048e4..81085dc 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -24,6 +24,9 @@ import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll"; import {ConnectHelper} from "./openaireLibrary/connect/connectHelper"; import {ResourcesService} from "./openaireLibrary/monitor/services/resources.service"; import {StringUtils} from "./openaireLibrary/utils/string-utils.class"; +import { + NotificationConfiguration +} from "./openaireLibrary/notifications/notifications-sidebar/notifications-sidebar.component"; @Component({ @@ -41,13 +44,13 @@ export class AppComponent implements OnInit, OnDestroy { hasAdminMenu: boolean = false; hasInternalSidebar: boolean = false; isFrontPage: boolean = false; + isMobile: boolean = false; view: Visibility; sideBarItems: MenuItem[] = []; backItem: MenuItem = null; menuItems: MenuItem[] = []; - notificationGroups: Option[] = []; - entities: string[]; notificationGroupsInitialized: boolean = false; + notificationConfiguration: NotificationConfiguration = new NotificationConfiguration(); stakeholderUtils: StakeholderUtils = new StakeholderUtils(); public stakeholderEntities = StakeholderEntities; menuHeader: Header = { @@ -118,6 +121,10 @@ export class AppComponent implements OnInit, OnDestroy { this.isFrontPage = isFrontPage; this.cdr.detectChanges(); })); + this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => { + this.isMobile = isMobile; + this.cdr.detectChanges(); + })); this.route.queryParams.subscribe(params => { this.view = params['view']; if(this.stakeholder) { @@ -136,12 +143,12 @@ export class AppComponent implements OnInit, OnDestroy { if (user) { this.user = user; if (!this.notificationGroupsInitialized) { - this.setNotificationGroups(); + this.setNotificationConfiguration(); } } else if(this.user) { this.user = user; this.notificationGroupsInitialized = false; - this.notificationGroups = []; + this.notificationConfiguration.availableGroups = []; } if(this.paramsSubscription) { this.paramsSubscription.unsubscribe(); @@ -201,26 +208,27 @@ export class AppComponent implements OnInit, OnDestroy { } } - public setNotificationGroups() { - this.entities = this.stakeholderUtils.types.map(option => option.value); - this.notificationGroups = []; + public setNotificationConfiguration() { + this.notificationConfiguration.entities = this.stakeholderUtils.types.map(option => option.value); + this.notificationConfiguration.service = 'monitor'; + this.notificationConfiguration.availableGroups = []; if (Session.isPortalAdministrator(this.user)) { - this.notificationGroups.push({value: Role.PORTAL_ADMIN, label: 'Portal Administrators'}); + this.notificationConfiguration.availableGroups.push({value: Role.PORTAL_ADMIN, label: 'Portal Administrators'}); } for (let type of this.stakeholderUtils.types) { if (Session.isCurator(type.value, this.user) || Session.isPortalAdministrator(this.user)) { - this.notificationGroups.push({value: Role.curator(type.value), label: type.label + ' Curators'}); - this.notificationGroups.push({value: Role.typeManager(type.value), label: type.label + ' Managers'}); - this.notificationGroups.push({value: Role.typeMember(type.value), label: type.label + ' Members'}); + this.notificationConfiguration.availableGroups.push({value: Role.curator(type.value), label: type.label + ' Curators'}); + this.notificationConfiguration.availableGroups.push({value: Role.typeManager(type.value), label: type.label + ' Managers'}); + this.notificationConfiguration.availableGroups.push({value: Role.typeMember(type.value), label: type.label + ' Members'}); } } this.subscriptions.push(this.stakeholderService.getMyStakeholders(this.properties.monitorServiceAPIURL).subscribe(stakeholders => { stakeholders.forEach(stakeholder => { - this.notificationGroups.push({ + this.notificationConfiguration.availableGroups.push({ value: Role.manager(stakeholder.type, stakeholder.alias), label: stakeholder.name + ' Managers' }); - this.notificationGroups.push({ + this.notificationConfiguration.availableGroups.push({ value: Role.member(stakeholder.type, stakeholder.alias), label: stakeholder.name + ' Members' }); diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 31d52de..a9f31d8 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 31d52de0e8f7a8ed506f597c555c5b952bcbdb02 +Subproject commit a9f31d830740cfdcea33266248b2421815834899 diff --git a/src/assets/common-assets b/src/assets/common-assets index 22728ec..7c314ad 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit 22728ec7de6c106bb4ede71e12a71cb061c6e8f8 +Subproject commit 7c314ad2eb1c0b855f97e8eed7295075710be2fd From af751636b2230926584880d4d64c0fefa401b10a Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 27 Mar 2023 15:00:12 +0300 Subject: [PATCH 08/13] Hide manage pages from menus. Remove header from admin pages --- src/app/app.component.ts | 16 +- src/app/general/general.component.html | 11 +- src/app/general/general.module.ts | 6 +- .../manageStakeholders.component.html | 17 +- .../manageStakeholders.module.ts | 8 +- src/app/openaireLibrary | 2 +- src/app/topic/topic.component.html | 285 ++++++++---------- src/app/topic/topic.module.ts | 5 +- src/app/users/users.component.html | 6 - 9 files changed, 155 insertions(+), 201 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 81085dc..ac26813 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -303,11 +303,11 @@ export class AppComponent implements OnInit, OnDestroy { } this.adminMenuItems = []; this.adminMenuItems.push(new MenuItem("general", "General", "", "/admin/" + this.stakeholder.alias, false, [], [], {}, {name: 'badge'})); - this.adminMenuItems.push(new MenuItem("indicators", "Indicators", "", "/admin/" + this.stakeholder.alias + '/indicators', false, [], [], {}, {name: 'bar_chart'})); + this.adminMenuItems.push(new MenuItem("indicators", "Indicators", "", "/admin/" + this.stakeholder.alias + '/indicators', false, [], [], {}, {name: 'bar_chart'}, null, "uk-visible@m")); if (this.stakeholder.defaultId) { - this.adminMenuItems.push(new MenuItem("users", "Users", "", "/admin/" + this.stakeholder.alias + "/users", false, [], [], {}, {name: 'group'}, null, null, "/admin/" + this.stakeholder.alias + "/users")); + this.adminMenuItems.push(new MenuItem("users", "Users", "", "/admin/" + this.stakeholder.alias + "/users", false, [], [], {}, {name: 'group'}, null, "uk-visible@m", "/admin/" + this.stakeholder.alias + "/users")); if (this.isCurator()) { - this.adminMenuItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/admin/" + this.stakeholder.alias + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/admin/" + this.stakeholder.alias + "/admin-tools")); + this.adminMenuItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/admin/" + this.stakeholder.alias + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, "uk-visible@m", "/admin/" + this.stakeholder.alias + "/admin-tools")); } } this.backItem = new MenuItem("back", "Manage profiles", "", "/admin", false, [], null, {}, {name: 'west'}); @@ -324,10 +324,10 @@ export class AppComponent implements OnInit, OnDestroy { "", "/admin", false, [], [], {})); } if (Session.isPortalAdministrator(this.user)) { - this.userMenuItems.push(new MenuItem("adminOptions", "Super Admin options", "", "/admin/admin-tools/portals", false, [], [], {})); + this.userMenuItems.push(new MenuItem("adminOptions", "Super Admin options", "", "/admin/admin-tools/portals", false, [], [], {},null, null, "uk-visible@m")); } if (this.isCurator()) { - this.userMenuItems.push(new MenuItem("monitorOptions", "Monitor options", "", "/admin/monitor/admin-tools/pages", false, [], [], {})); + this.userMenuItems.push(new MenuItem("monitorOptions", "Monitor options", "", "/admin/monitor/admin-tools/pages", false, [], [], {},null, null, "uk-visible@m")); } } if (this.stakeholder) { @@ -355,7 +355,7 @@ export class AppComponent implements OnInit, OnDestroy { this.menuItems.push( new MenuItem("manage", "Manage", "", "/admin/" + this.stakeholder.alias, false, [], null, {} - , null, null, null, null) + , null, null, "uk-visible@m", null) ); } if (!this.hasAdminMenu && this.isFrontPage) { @@ -413,10 +413,10 @@ export class AppComponent implements OnInit, OnDestroy { this.backItem = null; this.adminMenuItems.push(new MenuItem("stakeholders", "Manage profiles", "", "/admin", false, [], [], {}, {name: 'settings'})); if (Session.isPortalAdministrator(this.user)) { - this.adminMenuItems.push(new MenuItem("super_admin", "Super Admin options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, '/admin/admin-tools')); + this.adminMenuItems.push(new MenuItem("adminOptions", "Super Admin options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, "uk-visible@m", '/admin/admin-tools')); } if (Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user)) { - this.adminMenuItems.push(new MenuItem("monitor", "Monitor options", "", "/admin/monitor/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, '/admin/monitor/admin-tools')); + this.adminMenuItems.push(new MenuItem("monitorOptions", "Monitor options", "", "/admin/monitor/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, "uk-visible@m", '/admin/monitor/admin-tools')); } this.hasAdminMenu = this.hasAdminMenu && this.adminMenuItems.length > 1; } diff --git a/src/app/general/general.component.html b/src/app/general/general.component.html index 505a149..b6617a5 100644 --- a/src/app/general/general.component.html +++ b/src/app/general/general.component.html @@ -1,14 +1,7 @@
-
-
-
-
Manage Profile
-

{{stakeholder.name}} (unsaved changes)

-
-
-
-
+ +
+ - -
-
-
-
-
-
-
Manage Users
-

{{stakeholder.name}}

-
-
  • Managers
  • Members
  • From 685bb5342501d5d4dd7dfbb4a8d2f1d92a1ae360 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Mon, 27 Mar 2023 18:02:30 +0300 Subject: [PATCH 09/13] Update libraries before beta deploy --- src/assets/common-assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/common-assets b/src/assets/common-assets index 7c314ad..ca209a5 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit 7c314ad2eb1c0b855f97e8eed7295075710be2fd +Subproject commit ca209a54baaa2d9e0004613a68088fdcf4bee43a From a9a849a309cc22f6440638b9e81002fc70e2e62e Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 28 Mar 2023 08:57:53 +0300 Subject: [PATCH 10/13] Update library before deploy --- src/app/openaireLibrary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 461e4ac..f1f8246 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 461e4ac4ed542e4a24b4151eadb28e4c4283d5e2 +Subproject commit f1f824674d1431ca1d4e6c31d720d3e36b153d1e From cc788e95dc33f04d43c4a49ef901659857e00a80 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 28 Mar 2023 14:23:05 +0300 Subject: [PATCH 11/13] Fix indicatator path undefiend in dashboard if subcategory is changed quickly. --- src/app/monitor/monitor.component.ts | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/app/monitor/monitor.component.ts b/src/app/monitor/monitor.component.ts index ce435ad..e9ff6ef 100644 --- a/src/app/monitor/monitor.component.ts +++ b/src/app/monitor/monitor.component.ts @@ -487,21 +487,23 @@ export class MonitorComponent implements OnInit, OnDestroy { this.subscriptions.push(this.statisticsService.getNumbers(this.statisticsService.getSourceType(pair[0]), pair[1]).subscribe(response => { if(activeSubcategory === this.activeSubCategory._id) { indexes.forEach(([i, j]) => { - let result = JSON.parse(JSON.stringify(response)); - this.activeSubCategory.numbers[i].indicators[j].indicatorPaths[0].jsonPath.forEach(jsonPath => { - if (result) { - result = result[jsonPath]; - } - }); - if (typeof result === 'string' || typeof result === 'number') { - result = Number(result); - if (result === Number.NaN) { + if( this.activeSubCategory?.numbers[i]?.indicators[j]) { + let result = JSON.parse(JSON.stringify(response)); + this.activeSubCategory.numbers[i].indicators[j].indicatorPaths[0].jsonPath.forEach(jsonPath => { + if (result) { + result = result[jsonPath]; + } + }); + if (typeof result === 'string' || typeof result === 'number') { + result = Number(result); + if (result === Number.NaN) { + result = 0; + } + } else { result = 0; } - } else { - result = 0; + this.numberResults.set(i + '-' + j, result); } - this.numberResults.set(i + '-' + j, result); }); } })); From fbf9d91d03e195cefe1b65d771746d4e39488b74 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 5 Apr 2023 12:23:06 +0300 Subject: [PATCH 12/13] Update libraries before beta deployment --- src/app/openaireLibrary | 2 +- src/assets/openaire-theme | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index f1f8246..6dafcb3 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit f1f824674d1431ca1d4e6c31d720d3e36b153d1e +Subproject commit 6dafcb391a63771cf620d5bff79759ec94bae778 diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index f264617..aa1e6c9 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit f264617e5ab356c4279ee1ef1819db434fec4fba +Subproject commit aa1e6c9df390a4ba0919b5f8591374f7eec75089 From 0b793bba4031c253ca149ea3a47e434f6a2192eb Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 6 Apr 2023 11:32:20 +0300 Subject: [PATCH 13/13] Fix bug with desciption overlay in monitor dashboard --- src/app/monitor/monitor.component.html | 20 ++++++++++---------- src/app/monitor/monitor.component.ts | 21 +++++++++++---------- src/app/openaireLibrary | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/app/monitor/monitor.component.html b/src/app/monitor/monitor.component.html index 8dec924..cfa2c53 100644 --- a/src/app/monitor/monitor.component.html +++ b/src/app/monitor/monitor.component.html @@ -103,7 +103,7 @@
    -
    +
    {{indicator.name}}
    + (clickOutside)="closeDescriptionOverlay($event, indicator)">
    + (click)="toggleDescriptionOverlay($event, indicator)"> @@ -154,7 +154,7 @@
    -
    +
    {{indicator.name}}
    @@ -215,20 +215,20 @@ -
    + (clickOutside)="closeDescriptionOverlay($event, indicator)">
    -
    diff --git a/src/app/monitor/monitor.component.ts b/src/app/monitor/monitor.component.ts index e9ff6ef..4bf9845 100644 --- a/src/app/monitor/monitor.component.ts +++ b/src/app/monitor/monitor.component.ts @@ -11,15 +11,18 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; import { - Category, Indicator, - IndicatorPath, IndicatorSize, Section, + Category, + Indicator, + IndicatorPath, + IndicatorSize, + Section, Stakeholder, SubCategory, Topic, Visibility } from "../openaireLibrary/monitor/entities/stakeholder"; import {StatisticsService} from "../utils/services/statistics.service"; -import {IndicatorUtils, StakeholderUtils} from "../utils/indicator-utils"; +import {IndicatorUtils} from "../utils/indicator-utils"; import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service"; import {UntypedFormBuilder, UntypedFormControl} from "@angular/forms"; import {Subscriber, Subscription} from "rxjs"; @@ -51,7 +54,6 @@ export class MonitorComponent implements OnInit, OnDestroy { public loading: boolean = true; public view: Visibility; public indicatorUtils: IndicatorUtils = new IndicatorUtils(); - public stakeholderUtils: StakeholderUtils = new StakeholderUtils(); public activeTopic: Topic = null; public activeCategory: Category = null; public activeSubCategory: SubCategory = null; @@ -78,7 +80,6 @@ export class MonitorComponent implements OnInit, OnDestroy { privateStakeholder = false; public keyword: UntypedFormControl; public statsUpdateDate: Date; - public showDescriptionOverlay: boolean[] = []; public isFullscreen: boolean = false; public isMobile: boolean = false; @@ -611,14 +612,14 @@ export class MonitorComponent implements OnInit, OnDestroy { this.userManagementService.login(); } - toggleDescriptionOverlay(event, j) { + toggleDescriptionOverlay(event, indicator: Indicator) { event.stopPropagation(); - this.showDescriptionOverlay[j] = !this.showDescriptionOverlay[j]; + indicator.descriptionOverlay = !indicator.descriptionOverlay; } - closeDescriptionOverlay(event: ClickEvent,j) { - if(event.clicked && this.showDescriptionOverlay[j]) { - this.showDescriptionOverlay[j] = false; + closeDescriptionOverlay(event: ClickEvent, indicator: Indicator) { + if(event.clicked && indicator.descriptionOverlay) { + indicator.descriptionOverlay = false; } } } diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 6dafcb3..f49149c 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 6dafcb391a63771cf620d5bff79759ec94bae778 +Subproject commit f49149c99e7bf08179d95b56a1aac9848a850344