no message

This commit is contained in:
Diamantis Tziotzios 2024-01-30 13:26:31 +02:00
parent 5e99cef60e
commit 5e5bd39313
10 changed files with 287 additions and 218 deletions

View File

@ -1477,7 +1477,7 @@ public class DataManagementPlanManager {
Map extraProperties = objectMapper.readValue(dmpEntity.getExtraProperties(), HashMap.class);
if (extraProperties.containsKey("license")) {
Map<String, String> license = ((Map<String, String>) 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");

View File

@ -6,32 +6,6 @@
</mat-sidenav>
<mat-sidenav-content class="sidenav-content">
<div id="main-page">
<div class="main-content h-100 pb-0" *ngIf="newReleaseNotificationVisible">
<div class="container-fluid">
<div class="d-flex flex-direction-row">
<div class="card notification-header">
<div class="col">
<div class="row">
<div class="col-auto info">
<div class="notification-title">{{'NEW-RELEASE-NOTIFICATION.TITLE' | translate}}</div>
<div class="notification-subtitle" *ngIf="!this.configurationService.newReleaseNotificationLink">{{'NEW-RELEASE-NOTIFICATION.SUBTITLE' | translate}}</div>
<div class="notification-subtitle" *ngIf="this.configurationService.newReleaseNotificationLink">{{'NEW-RELEASE-NOTIFICATION.SUBTITLE-WITH-PRE-LINK' | translate }} <a class="notification-link" href="{{this.configurationService.newReleaseNotificationLink}}" target="_blank">{{'NEW-RELEASE-NOTIFICATION.SUBTITLE-LINK-TEXT' | translate }}</a> {{'NEW-RELEASE-NOTIFICATION.SUBTITLE-WITH-AFTER-LINK' | translate }}</div>
</div>
<div class="ml-auto d-flex flex-row">
<div class="col-auto d-flex align-items-center">
<div>
<button mat-raised-button class="notification-save-btn" (click)="dismissNewReleaseNotification()">
{{'NEW-RELEASE-NOTIFICATION.ACTIONS.DISMISS' | translate}}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<router-outlet (activate)='onActivate($event)' (deactivate)='onDeactivate($event)'></router-outlet>
</div>
</mat-sidenav-content>

View File

@ -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;
}
}

View File

@ -3,6 +3,25 @@
<div *ngIf="this.dashboardStatisticsData">
<div class="main-content">
<div class="col">
<div *ngIf="newReleaseNotificationVisible" class="new-releases-card col-auto mt-0" [style.display]="isVisible ? 'block' : 'none'">
<a class="col-auto d-flex" (click)="dismissNewReleaseNotification()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
<div class="row new-releases-hint-container m-0">
<p class="new-releases-chip mb-0 col-auto">{{'NEW-RELEASE-NOTIFICATION.HINT' | translate}}</p>
</div>
<p class="new-releases-title mb-0 pt-4">{{'NEW-RELEASE-NOTIFICATION.TITLE' | translate}}</p>
<p class="new-releases-content mb-0">{{'NEW-RELEASE-NOTIFICATION.BODY' | translate}}</p>
<div class="row d-flex align-items-center mt-4" *ngIf="this.configurationService.newReleaseNotificationLink">
<div class="col-auto d-flex">
<a class="notification-link" href="{{this.configurationService.newReleaseNotificationLink}}" target="_blank">
<button mat-raised-button type="button" class="col-auto align-self-center new-releases-btn">{{'NEW-RELEASE-NOTIFICATION.ACTIONS.LEARN-MORE' | translate}}</button>
</a>
</div>
<!-- <span class="col-auto ml-auto">
<img class="laptop-img\6" src="../../../assets/images/dashboard-popup.png">
</span> -->
</div>
</div>
<div class="card col-auto mt-0" [style.display]="isVisible ? 'block' : 'none'">
<a *ngIf="this.hasDmps()" class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto mt-3 material-icons clear-icon">clear</span></a>
@ -32,8 +51,7 @@
<div *ngIf="this.hasDmps()" class="col">
<div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div>
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom"
[selectedIndex]="indexFromCurrentType" (selectedTabChange)="currentType = $event.tab.ariaLabel">
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom" [selectedIndex]="indexFromCurrentType" (selectedTabChange)="currentType = $event.tab.ariaLabel">
<!-- <mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}} ({{totalRecents}})">-->
<mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}">
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)" [isActive]="currentType == 'recent'"></app-recent-edited-activity>
@ -129,8 +147,7 @@
</div>
<div *ngIf="hasDmps()" class="col activity">
<div class="latest-activity-title">{{'DASHBOARD.LATEST-ACTIVITY' | translate}}</div>
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom" (
[selectedIndex]="indexFromCurrentType" selectedTabChange)="currentType = $event.tab.ariaLabel">
<mat-tab-group mat-align-tabs="start" class="remove-border-bottom" ( [selectedIndex]="indexFromCurrentType" selectedTabChange)="currentType = $event.tab.ariaLabel">
<!-- <mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}} ({{totalRecents}})">-->
<mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}">
<app-recent-edited-activity (totalCountRecentEdited)="onCountAllRecent($event)" [isActive]="currentType == 'recent'"></app-recent-edited-activity>

View File

@ -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%;
}

View File

@ -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;
}
}

View File

@ -296,7 +296,6 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
const request: DataTableRequest<DatasetProfileCriteria> = new DataTableRequest<DatasetProfileCriteria>(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))

View File

@ -53,7 +53,7 @@
</ol>
<ul *ngIf="hasProfile(i)" class="add-dataset-option">
<li>
<a class="add-dataset-action" (click)="addDataset(i)">
<a class="add-dataset-action" [routerLink]="['/datasets/new/' + dmp.id + '/' + i]">
<mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DESCRIPTION-FOR-SECTION' | translate}}
</a>
</li>

View File

@ -109,6 +109,6 @@
"newReleaseNotification": {
"link": "https://google.com",
"versionCode": "0",
"expires": "2024-01-28T00:00"
"expires": "2024-02-15T00:00"
}
}

View File

@ -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. Dont miss out explore now!",
"ACTIONS": {
"DISMISS": "Dismiss"
"LEARN-MORE": "Learn more"
}
}
}