From 5e5bd39313c1fb84f5938c0d9489294cbf763eb8 Mon Sep 17 00:00:00 2001 From: Diamantis Tziotzios Date: Tue, 30 Jan 2024 13:26:31 +0200 Subject: [PATCH] no message --- .../managers/DataManagementPlanManager.java | 2 +- dmp-frontend/src/app/app.component.html | 28 +- dmp-frontend/src/app/app.component.ts | 24 -- .../app/ui/dashboard/dashboard.component.html | 329 +++++++++--------- .../app/ui/dashboard/dashboard.component.scss | 77 +++- .../app/ui/dashboard/dashboard.component.ts | 32 +- .../dataset-wizard.component.ts | 1 - .../dmp-editor-blueprint.component.html | 2 +- dmp-frontend/src/assets/config/config.json | 2 +- dmp-frontend/src/assets/i18n/en.json | 8 +- 10 files changed, 287 insertions(+), 218 deletions(-) diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java index 295d04bc1..5573ea2b5 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java @@ -1477,7 +1477,7 @@ public class DataManagementPlanManager { Map extraProperties = objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class); if (extraProperties.containsKey("license")) { Map license = ((Map) extraProperties.get("license")); - if (!StringUtils.isEmpty(license.get("pid"))) { + if (license != null && !StringUtils.isEmpty(license.get("pid"))) { XWPFRun runLicense = systemFieldParagraph.createRun(); runLicense.setText(license.get("pid").toString()); runLicense.setColor("116a78"); diff --git a/dmp-frontend/src/app/app.component.html b/dmp-frontend/src/app/app.component.html index 5e8220739..4fdd72aef 100644 --- a/dmp-frontend/src/app/app.component.html +++ b/dmp-frontend/src/app/app.component.html @@ -5,33 +5,7 @@ -
-
-
-
-
-
-
-
-
{{'NEW-RELEASE-NOTIFICATION.TITLE' | translate}}
-
{{'NEW-RELEASE-NOTIFICATION.SUBTITLE' | translate}}
-
{{'NEW-RELEASE-NOTIFICATION.SUBTITLE-WITH-PRE-LINK' | translate }} {{'NEW-RELEASE-NOTIFICATION.SUBTITLE-LINK-TEXT' | translate }} {{'NEW-RELEASE-NOTIFICATION.SUBTITLE-WITH-AFTER-LINK' | translate }}
-
-
-
-
- -
-
-
-
-
-
-
-
-
+
diff --git a/dmp-frontend/src/app/app.component.ts b/dmp-frontend/src/app/app.component.ts index c35c77e1c..0d3cc7dc0 100644 --- a/dmp-frontend/src/app/app.component.ts +++ b/dmp-frontend/src/app/app.component.ts @@ -40,7 +40,6 @@ export class AppComponent implements OnInit, AfterViewInit { helpContentEnabled: boolean; private statusChangeSubscription: Subscription; onlySplash = true; - newReleaseNotificationVisible = false; @ViewChild('sidenav') sidenav: MatSidenav; @@ -97,7 +96,6 @@ export class AppComponent implements OnInit, AfterViewInit { } }); }); - this.newReleaseNotificationVisible = this.isNewReleaseNotificationVisible(); } onActivate(event: any) { @@ -236,27 +234,5 @@ export class AppComponent implements OnInit, AfterViewInit { toggleNavbar(event) { document.getElementById('hamburger').classList.toggle("change"); } - - dismissNewReleaseNotification() { - this.cookieService.set('new-release-dismiss-' + this.configurationService.newReleaseNotificationVersionCode, 'true', 5000, null, null, false, 'Lax'); - this.newReleaseNotificationVisible = false; - } - - isNewReleaseNotificationVisible() { - if (this.configurationService.newReleaseNotificationVersionCode == null) { - return false; - } - if (this.configurationService.newReleaseNotificationExpires == null && this.configurationService.newReleaseNotificationLink == null) { - return false; - } - if (this.configurationService.newReleaseNotificationExpires != null && moment(this.configurationService.newReleaseNotificationExpires).tz('UTC') < moment.utc()) { - return false; - } - if (this.cookieService.get('new-release-dismiss-' + this.configurationService.newReleaseNotificationVersionCode) === 'true') { - return false; - } - - return true; - } } diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html index 18fa44347..3dff5ab3b 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.html +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.html @@ -1,186 +1,202 @@
-
-
-
- clear +
+
+
+ clear +
+

{{'NEW-RELEASE-NOTIFICATION.HINT' | translate}}

+
+

{{'NEW-RELEASE-NOTIFICATION.TITLE' | translate}}

+

{{'NEW-RELEASE-NOTIFICATION.BODY' | translate}}

-

{{'DASHBOARD.DMP-QUESTION' | translate}}

-

{{'DASHBOARD.INFO-DMP-TEXT' | translate}}

- -

- {{'DASHBOARD.NEW-QUESTION' | translate}} {{'DASHBOARD.OPEN-AIR-GUIDE' | translate}} {{'DASHBOARD.LEARN-MORE' | translate}} -

-

{{'DASHBOARD.DMP-ABOUT-BEG' | translate}} - {{'DASHBOARD.DATASET-DESCRIPTIONS-DASHBOARD-TEXT' | translate}} - {{'DASHBOARD.DMP-ABOUT-END' | translate}} -

- -
-
- -
-
- -
- - - + +
+
+ clear -
-
{{'DASHBOARD.LATEST-ACTIVITY' | translate}}
- - - - -
{{'DASHBOARD.EMPTY-LIST' | translate}}
-
- - - -
{{'DASHBOARD.EMPTY-LIST' | translate}}
-
> - - - -
{{'DASHBOARD.EMPTY-LIST' | translate}}
-
- - - -
{{'DASHBOARD.EMPTY-LIST' | translate}}
-
- -
-
-
+

{{'DASHBOARD.DMP-QUESTION' | translate}}

+

{{'DASHBOARD.INFO-DMP-TEXT' | translate}}

+ +

+ {{'DASHBOARD.NEW-QUESTION' | translate}} {{'DASHBOARD.OPEN-AIR-GUIDE' | translate}} {{'DASHBOARD.LEARN-MORE' | translate}} +

+

{{'DASHBOARD.DMP-ABOUT-BEG' | translate}} + {{'DASHBOARD.DATASET-DESCRIPTIONS-DASHBOARD-TEXT' | translate}} + {{'DASHBOARD.DMP-ABOUT-END' | translate}} +

+ +
+
+ +
+
+ +
+ + +
- - - -
-
{{'DASHBOARD.PERSONAL-USAGE' | translate}}
-
- {{dashboardStatisticsData?.totalDataManagementPlanCount}}
- {{'DASHBOARD.DMPS' | translate}} -
- {{dashboardStatisticsData?.totalDataSetCount}}
- {{'DASHBOARD.DESCRIPTIONS' | translate}} -
- {{dashboardStatisticsData?.totalGrantCount}}
- {{'DASHBOARD.GRANTS' | translate}} -
- {{dashboardStatisticsData?.totalOrganisationCount}}
- {{'DASHBOARD.RELATED-ORGANISATIONS' | translate}} +
+
{{'DASHBOARD.LATEST-ACTIVITY' | translate}}
+ + + + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
+ + + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
> + + + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
+ + + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
+ +
+
+
-
- -
-
+ + +
+
{{'DASHBOARD.PERSONAL-USAGE' | translate}}
+
+ {{dashboardStatisticsData?.totalDataManagementPlanCount}}
+ {{'DASHBOARD.DMPS' | translate}} +
+ {{dashboardStatisticsData?.totalDataSetCount}}
+ {{'DASHBOARD.DESCRIPTIONS' | translate}} +
+ {{dashboardStatisticsData?.totalGrantCount}}
+ {{'DASHBOARD.GRANTS' | translate}} +
+ {{dashboardStatisticsData?.totalOrganisationCount}}
+ {{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}
+
- -
-
- +
+
+ -
-
-
-
-
- clear -
-

{{'DASHBOARD.TITLE' | translate}}

-

{{'DASHBOARD.INFO-TEXT' | translate}}

-
-
- - - -
+
+
+
+
+
+ clear +
+

{{'DASHBOARD.TITLE' | translate}}

+

{{'DASHBOARD.INFO-TEXT' | translate}}

-
-
{{'DASHBOARD.LATEST-ACTIVITY' | translate}}
- - - - -
{{'DASHBOARD.EMPTY-LIST' | translate}}
-
- - - -
{{'DASHBOARD.EMPTY-LIST' | translate}}
-
- - - -
{{'DASHBOARD.EMPTY-LIST' | translate}}
- + + +
+
+
+
{{'DASHBOARD.LATEST-ACTIVITY' | translate}}
+ + + + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
+ + + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+
+ + + +
{{'DASHBOARD.EMPTY-LIST' | translate}}
+ -
-
-
+ +
-
- -
-
{{'DASHBOARD.PUBLIC-USAGE' | translate}}
-
- {{dashboardStatisticsData?.totalDataManagementPlanCount}}
- {{'DASHBOARD.PUBLIC-DMPS' | translate}} -
- {{dashboardStatisticsData?.totalDataSetCount}}
- {{'DASHBOARD.PUBLIC-DATASETS' | translate}} -
- {{dashboardStatisticsData?.totalGrantCount}}
- {{'DASHBOARD.GRANTS' | translate}} -
- {{dashboardStatisticsData?.totalOrganisationCount}}
- {{'DASHBOARD.RELATED-ORGANISATIONS' | translate}} -
+
+
+ +
+
{{'DASHBOARD.PUBLIC-USAGE' | translate}}
+
+ {{dashboardStatisticsData?.totalDataManagementPlanCount}}
+ {{'DASHBOARD.PUBLIC-DMPS' | translate}} +
+ {{dashboardStatisticsData?.totalDataSetCount}}
+ {{'DASHBOARD.PUBLIC-DATASETS' | translate}} +
+ {{dashboardStatisticsData?.totalGrantCount}}
+ {{'DASHBOARD.GRANTS' | translate}} +
+ {{dashboardStatisticsData?.totalOrganisationCount}}
+ {{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}
@@ -188,10 +204,11 @@
+
- +
--> \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss b/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss index 6df4b8c2c..afaf00182 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss @@ -396,7 +396,7 @@ input[type="text"] { .add-dataset-btn { height: 40px; - margin-left: 40px; + margin-left: 40px; } :host ::ng-deep .mat-tab-group.mat-primary .mat-ink-bar, @@ -425,6 +425,81 @@ input[type="text"] { padding: 0.3rem 0rem 0.6rem 0rem !important; } +.new-releases-hint-container { + padding-left: 40px; + /* padding-top: 40px; */ + padding-right: 55px; +} + +.new-releases-card { + box-shadow: 0px 3px 6px #00000029; + max-width: 712px; + min-width: 17.5rem; + margin-top: 0rem; + margin-bottom: 3.75rem; + + background: transparent linear-gradient(127deg, #EDAEB3 0%, #E1368A 100%) 0% 0% no-repeat padding-box; + border-radius: 6px; + opacity: 1; + padding-bottom: 2em; +} + +.new-releases-btn { + height: 40px; + margin-left: 40px; + + background: var(--primary-color) 0% 0% no-repeat padding-box; + border-radius: 30px; + opacity: 1; + color: #FFFFFF; + padding-right: 2em; + padding-left: 2em; +} + +.new-releases-chip { + // margin-bottom: 1em; + // margin-left: 2.5em; + // margin-right: 2.5em; + color: #fff; + /* text-transform: uppercase; */ + text-align: center; + font-weight: 500; + /* max-width: 160px; */ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + background: #EAEAEA 0% 0% no-repeat padding-box; + border-radius: 30px; + opacity: 0.7; + /* font: normal normal bold 12px/21px Aileron; */ + letter-spacing: 0.12px; + color: #6E6E6E; +} + +.new-releases-title { + text-align: left; + font: Bold 30px/34px Roboto; + letter-spacing: 0px; + color: #212121; + padding-left: 40px; + /* padding-top: 40px; */ + padding-right: 55px; + opacity: 1; +} + +.new-releases-content { + text-align: left; + font-weight: 300; + font-size: 1rem; + letter-spacing: 0px; + color: #212121; + padding-left: 40px; + font: normal normal normal 16px/24px Roboto; + padding-top: 36px; + padding-right: 55px; + opacity: 1; +} + /* ::ng-deep .mat-tab-group { height: 100%; } diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts b/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts index 9897d725a..6018e0538 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts @@ -35,6 +35,9 @@ import { UiNotificationService, SnackBarNotificationLevel } from '@app/core/serv import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service'; import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants'; import { MatomoService } from '@app/core/services/matomo/matomo-service'; +import { ConfigurationService } from '@app/core/services/configuration/configuration.service'; +import * as moment from 'moment'; +import { CookieService } from 'ngx-cookie-service'; @Component({ @@ -73,6 +76,7 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC importFileText: string; startWizardText: string; currentType: string = "recent"; + newReleaseNotificationVisible = false; constructor( private router: Router, @@ -89,7 +93,9 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC private language: TranslateService, private uiNotificationService: UiNotificationService, private guidedTourService: GuidedTourService, - private matomoService: MatomoService + private matomoService: MatomoService, + private cookieService: CookieService, + public configurationService: ConfigurationService ) { super(); // this.dashboardStatisticsData.totalDataManagementPlanCount = 0; @@ -154,6 +160,8 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC this.filteredOptions = this.searchControl.valueChanges.pipe(mergeMap(x => { return this.searchBarService.search(x); })); + + this.newReleaseNotificationVisible = this.isNewReleaseNotificationVisible(); } public get indexFromCurrentType() { @@ -400,4 +408,26 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC // viewAllPublicDatasetsClicked() { // this.router.navigate(['explore']); // } + + dismissNewReleaseNotification() { + this.cookieService.set('new-release-dismiss-' + this.configurationService.newReleaseNotificationVersionCode, 'true', 5000, null, null, false, 'Lax'); + this.newReleaseNotificationVisible = false; + } + + isNewReleaseNotificationVisible() { + if (this.configurationService.newReleaseNotificationVersionCode == null) { + return false; + } + if (this.configurationService.newReleaseNotificationExpires == null && this.configurationService.newReleaseNotificationLink == null) { + return false; + } + if (this.configurationService.newReleaseNotificationExpires != null && moment(this.configurationService.newReleaseNotificationExpires).tz('UTC') < moment.utc()) { + return false; + } + if (this.cookieService.get('new-release-dismiss-' + this.configurationService.newReleaseNotificationVersionCode) === 'true') { + return false; + } + + return true; + } } diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index 4997a57bc..27f39e705 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -296,7 +296,6 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme const request: DataTableRequest = new DataTableRequest(null, null, null); request.criteria = new DatasetProfileCriteria(); request.criteria.ids = []; - result.definition.sections[this.dmpSectionIndex].descriptionTemplates.forEach(template => request.criteria.ids.push(template.descriptionTemplateId)); this.availableDescriptionTemplates.forEach(template => request.criteria.ids.push(template.id)); this.datasetService.getDatasetProfilesWithPrefilling(request) .pipe(takeUntil(this._destroyed)) diff --git a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.html b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.html index 86db6db58..2c24f8858 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.html +++ b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor-blueprint.component.html @@ -53,7 +53,7 @@
  • - + add{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-FOR-SECTION' | translate}}
  • diff --git a/dmp-frontend/src/assets/config/config.json b/dmp-frontend/src/assets/config/config.json index 11a786479..4c5d65277 100644 --- a/dmp-frontend/src/assets/config/config.json +++ b/dmp-frontend/src/assets/config/config.json @@ -109,6 +109,6 @@ "newReleaseNotification": { "link": "https://google.com", "versionCode": "0", - "expires": "2024-01-28T00:00" + "expires": "2024-02-15T00:00" } } diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 5d386694a..13583e4ee 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -1986,12 +1986,10 @@ }, "NEW-RELEASE-NOTIFICATION": { "TITLE": "New ARGOS Release!", - "SUBTITLE": "Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum.", - "SUBTITLE-WITH-PRE-LINK": "Check all the new features ", - "SUBTITLE-WITH-AFTER-LINK": ".", - "SUBTITLE-LINK-TEXT": "here", + "HINT": "Discover the all-new Argos version", + "BODY": "Discover the latest enhancements and improvements with our brand-new Argos release! Elevate your experience with a range of exciting features and updates. Stay ahead of the curve and check out all the innovative additions designed to make your Argos experience even more seamless and powerful. Don’t miss out – explore now!", "ACTIONS": { - "DISMISS": "Dismiss" + "LEARN-MORE": "Learn more" } } }