Merge remote-tracking branch 'origin/ui-redesign' into ui-redesign

This commit is contained in:
George Kalampokis 2020-07-22 15:40:56 +03:00
commit 80bdf5a77b
24 changed files with 2612 additions and 306 deletions

View File

@ -22,6 +22,7 @@ import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { DmpInvitationDialogComponent } from '@app/ui/dmp/invitation/dmp-invitation-dialog.component';
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
import { Location } from '@angular/common';
@Component({
selector: 'app-drafts',
@ -55,7 +56,8 @@ export class DraftsComponent extends BaseComponent implements OnInit {
public dialog: MatDialog,
private datasetWizardService: DatasetWizardService,
public enumUtils: EnumUtils,
private uiNotificationService: UiNotificationService
private uiNotificationService: UiNotificationService,
private location: Location
) {
super();
}
@ -170,8 +172,8 @@ export class DraftsComponent extends BaseComponent implements OnInit {
this.datasetWizardService.delete(id)
.pipe(takeUntil(this._destroyed))
.subscribe(
complete => this.onCallbackSuccess(),
error => this.onCallbackError(error)
complete => this.onDeleteCallbackSuccess(),
error => this.onDeleteCallbackError(error)
);
}
});
@ -198,6 +200,22 @@ export class DraftsComponent extends BaseComponent implements OnInit {
// this.setErrorModel(error.error);
}
reloadPage(): void {
const path = this.location.path();
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate([path]);
});
}
onDeleteCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DELETE'), SnackBarNotificationLevel.Success);
this.reloadPage();
}
onDeleteCallbackError(error) {
this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-DELETE'), SnackBarNotificationLevel.Error);
}
downloadPDF(dataset: DatasetListingModel): void {
this.datasetWizardService.downloadPDF(dataset.id as string)
.pipe(takeUntil(this._destroyed))

View File

@ -82,7 +82,7 @@
<button mat-menu-item (click)="viewVersions(getGroupId(activity), activity.title)">
<mat-icon>library_books</mat-icon>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}
</button>
<button mat-menu-item *ngIf="isUserOwner(activity)" (click)="deleteClicked()" class="menu-item">
<button mat-menu-item *ngIf="isUserOwner(activity)" (click)="deleteClicked(activity)" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
</button>
</mat-menu>

View File

@ -30,6 +30,7 @@ import { DatasetWizardService } from '@app/core/services/dataset-wizard/dataset-
import { FormControl, FormBuilder } from '@angular/forms';
import { DatasetCopyDialogueComponent } from '@app/ui/dataset/dataset-wizard/dataset-copy-dialogue/dataset-copy-dialogue.component';
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
import { Location } from '@angular/common';
@Component({
selector: 'app-recent-edited-activity',
@ -64,7 +65,8 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
private language: TranslateService,
private dialog: MatDialog,
private uiNotificationService: UiNotificationService,
private datasetWizardService: DatasetWizardService
private datasetWizardService: DatasetWizardService,
private location: Location
) {
super();
}
@ -158,7 +160,7 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
this.dmpService.delete(dmp.id)
.pipe(takeUntil(this._destroyed))
.subscribe(
complete => { this.onCallbackSuccess() },
complete => this.onDeleteCallbackSuccess(),
error => this.onDeleteCallbackError(error)
);
}
@ -186,6 +188,18 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
this.router.navigate(['/plans']);
}
reloadPage(): void {
const path = this.location.path();
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate([path]);
});
}
onDeleteCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DELETE'), SnackBarNotificationLevel.Success);
this.reloadPage();
}
onDeleteCallbackError(error) {
this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-DELETE'), SnackBarNotificationLevel.Error);
}
@ -394,8 +408,8 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
this.datasetWizardService.delete(id)
.pipe(takeUntil(this._destroyed))
.subscribe(
complete => this.onCallbackSuccess(),
// error => this.onCallbackError(error)
complete => this.onDeleteCallbackSuccess(),
error => this.onDeleteCallbackError(error)
);
}
});

View File

@ -54,7 +54,7 @@
<button mat-menu-item *ngIf="isAuthenticated()" (click)="openDmpSearchDialogue(activity.id)" class="menu-item">
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}
</button>
<button mat-menu-item *ngIf="isUserOwner" (click)="openConfirm(activity.id)" class="menu-item">
<button mat-menu-item *ngIf="isUserOwner(activity)" (click)="openConfirm(activity.id)" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}
</button>
<!-- <button mat-menu-item *ngIf="needsUpdate(activity)" class="menu-item" (click)="openUpdateDatasetProfileDialogue(activity.id);">

View File

@ -23,6 +23,7 @@ import { DatasetStatus } from '@app/core/common/enum/dataset-status';
import { DmpInvitationDialogComponent } from '@app/ui/dmp/invitation/dmp-invitation-dialog.component';
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
import { Role } from '@app/core/common/enum/role';
import { Location } from '@angular/common';
@Component({
selector: 'app-recent-edited-dataset-activity',
@ -53,7 +54,8 @@ export class RecentEditedDatasetActivityComponent extends BaseComponent implemen
public dialog: MatDialog,
public router: Router,
private datasetWizardService: DatasetWizardService,
private uiNotificationService: UiNotificationService
private uiNotificationService: UiNotificationService,
private location: Location
) {
super();
}
@ -185,8 +187,8 @@ export class RecentEditedDatasetActivityComponent extends BaseComponent implemen
this.datasetWizardService.delete(id)
.pipe(takeUntil(this._destroyed))
.subscribe(
complete => this.onCallbackSuccess(),
error => this.onCallbackError(error)
complete => this.onDeleteCallbackSuccess(),
error => this.onDeleteCallbackError(error)
);
}
});
@ -265,6 +267,22 @@ export class RecentEditedDatasetActivityComponent extends BaseComponent implemen
this.setErrorModel(error.error);
}
reloadPage(): void {
const path = this.location.path();
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate([path]);
});
}
onDeleteCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DELETE'), SnackBarNotificationLevel.Success);
this.reloadPage();
}
onDeleteCallbackError(error) {
this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-DELETE'), SnackBarNotificationLevel.Error);
}
openUpdateDatasetProfileDialogue(id: string) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
restoreFocus: false,

View File

@ -22,6 +22,7 @@ import { DatasetListingModel } from '@app/core/model/dataset/dataset-listing';
import { Role } from '@app/core/common/enum/role';
import { FormBuilder, FormControl } from '@angular/forms';
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
import { Location } from '@angular/common';
@Component({
selector: 'app-recent-edited-dmp-activity',
@ -55,7 +56,8 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O
private datasetService: DatasetService,
private language: TranslateService,
private dialog: MatDialog,
private uiNotificationService: UiNotificationService
private uiNotificationService: UiNotificationService,
private location: Location
) {
super();
}
@ -143,7 +145,7 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O
this.dmpService.delete(dmp.id)
.pipe(takeUntil(this._destroyed))
.subscribe(
complete => { this.onCallbackSuccess() },
complete => this.onDeleteCallbackSuccess(),
error => this.onDeleteCallbackError(error)
);
}
@ -171,6 +173,18 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O
this.router.navigate(['/plans']);
}
reloadPage(): void {
const path = this.location.path();
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate([path]);
});
}
onDeleteCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DELETE'), SnackBarNotificationLevel.Success);
this.reloadPage();
}
onDeleteCallbackError(error) {
this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-DELETE'), SnackBarNotificationLevel.Error);
}

View File

@ -32,7 +32,7 @@
<button *ngIf="isAuthenticated()" mat-menu-item (click)="openDmpSearchDialogue(dataset)" class="menu-item">
<mat-icon>file_copy</mat-icon>{{'DATASET-WIZARD.ACTIONS.COPY-DATASET' | translate}}
</button>
<button *ngIf="isUserOwner && !lockStatus" mat-menu-item (click)="openConfirm(dataset.id)" class="menu-item">
<button *ngIf="isUserOwner" mat-menu-item (click)="openConfirm(dataset.id)" class="menu-item">
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}
</button>
<!-- <button mat-menu-item *ngIf="needsUpdate(activity)" class="menu-item" (click)="openUpdateDatasetProfileDialogue(activity.id);">

View File

@ -19,6 +19,7 @@ import { Principal } from '@app/core/model/auth/principal';
import { AuthService } from '@app/core/services/auth/auth.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { Role } from '@app/core/common/enum/role';
import { Location } from '@angular/common';
@Component({
selector: 'app-dataset-listing-item-component',
@ -45,7 +46,8 @@ export class DatasetListingItemComponent extends BaseComponent implements OnInit
private language: TranslateService,
private authentication: AuthService,
private uiNotificationService: UiNotificationService,
private lockService: LockService
private lockService: LockService,
private location: Location
) {
super();
}
@ -203,13 +205,14 @@ export class DatasetListingItemComponent extends BaseComponent implements OnInit
}
reloadPage(): void {
const path = this.location.path();
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate(['/datasets']);
this.router.navigate([path]);
});
}
onDeleteCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DATASET-PROFILE-DELETE'), SnackBarNotificationLevel.Success);
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DELETE'), SnackBarNotificationLevel.Success);
this.reloadPage();
}
@ -217,10 +220,10 @@ export class DatasetListingItemComponent extends BaseComponent implements OnInit
this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-DELETE'), SnackBarNotificationLevel.Error);
}
// onCallbackSuccess(id?: String): void {
// this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
// id ? this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', id]); }) : this.router.navigate(['/datasets']);
// }
onCallbackSuccess(id?: String): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
id ? this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', id]); }) : this.router.navigate(['/datasets']);
}
roleDisplay(value: any) {
const principal: Principal = this.authentication.current();

View File

@ -166,10 +166,11 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
}
reloadPage(): void {
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate([`/datasets/overview/${this.dataset.id}`]);
});
}
const path = this.location.path();
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate([path]);
});
}
getDmpResearchers() {
this.dmpService.getSingle(this.dataset.dmp.id).pipe(takeUntil(this._destroyed))
@ -301,7 +302,7 @@ export class DatasetOverviewComponent extends BaseComponent implements OnInit {
}
onDeleteCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DATASET-PROFILE-DELETE'), SnackBarNotificationLevel.Success);
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DELETE'), SnackBarNotificationLevel.Success);
this.router.navigate(['/datasets']);
}

View File

@ -1,72 +0,0 @@
<div class="form-container">
<form *ngIf="formGroup" [formGroup]="formGroup" class="m-0">
<div class="row d-flex justify-content-end m-0" (click)="closeDialog()">
<mat-icon class="close-icon">close</mat-icon>
</div>
<div class="row m-0">
<h1 mat-dialog-title class="title">{{'DMP-LISTING.ACTIONS.INVITE-AUTHORS' | translate}}</h1>
</div>
<div mat-dialog-content class="row content">
<mat-form-field class="col pt-0 pb-2 mb-4" appearance="standard">
<app-multiple-auto-complete [formControl]="formGroup.get('users')"
placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}"
[configuration]="usersAutoCompleteConfiguration">
</app-multiple-auto-complete>
</mat-form-field>
<div class="col-12 d-flex justify-content-end align-items-center row m-0 pr-0">
<mat-form-field class="select-role" floatLabel="never">
<mat-label>{{'DMP-LISTING.MEMBER' | translate}}</mat-label>
<mat-select [formControl]="formGroup.get('role')">
<mat-option *ngFor="let roleName of roleNames | keyvalue" selected [value]="roles[roleName.value]">
{{ roleName.value }}
</mat-option>
</mat-select>
</mat-form-field>
<button mat-raised-button (click)="send()" type="button"
class="invite-btn">{{'DMP-LISTING.ACTIONS.INVITE-SHORT' | translate}}</button>
</div>
</div>
</form>
</div>
<!-- <form *ngIf="formGroup" [formGroup]="formGroup">
<h1 mat-dialog-title>{{'INVITATION-EDITOR.TITLE' | translate}} {{data.dmpName}}</h1>
<div mat-dialog-content> -->
<!-- User -->
<!-- <mat-form-field class="col">
<app-multiple-auto-complete [formControl]="formGroup.get('users')"
placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER' | translate}}"
[configuration]="usersAutoCompleteConfiguration">
</app-multiple-auto-complete>
</mat-form-field> -->
<!-- Email -->
<!-- <mat-form-field class="example-chip-list col">
<mat-chip-list #chipList>
<mat-chip *ngFor="let email of emails" [selectable]="selectable" [removable]="removable"
(removed)="remove(email)">
{{email}}
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
</mat-chip>
<input placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-EMAIL' | translate}}" [matChipInputFor]="chipList"
[matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="addOnBlur"
(matChipInputTokenEnd)="add($event)">
</mat-chip-list>
</mat-form-field> -->
<!-- <mat-form-field class="col">
<app-multiple-auto-complete required='false' [formControl]="formGroup.get('users').get('email')"
placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-EMAIL' | translate}}"
[configuration]="emailAutoCompleteConfiguration" ()>
</app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('users').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}
</mat-error>
</mat-form-field> -->
<!-- <div class="col-12 d-flex">
<button mat-raised-button color="primary" (click)="send()" type="button" class="ml-auto">{{'INVITATION-EDITOR.ACTIONS.SEND-INVITATION' | translate}}</button>
</div>
</div>
</form> -->

View File

@ -1,71 +0,0 @@
.form-container {
width: 33em;
min-height: 14em;
padding: 0.28em 0.34em 0.875em 1.125em;
}
.close-icon {
cursor: pointer;
}
.title {
font-size: 2.375em;
font-weight: lighter;
color: #000000;
opacity: 0.8;
margin-bottom: 0.842em;
}
.content {
width: 31em;
margin: 0px;
padding: 0px;
}
.mat-form-field {
background: #FAFAFA;
border: 1px solid #D1D1D1;
border-radius: 4px;
}
::ng-deep .mat-dialog-container {
border-radius: 8px;
}
::ng-deep .mat-form-field-underline {
display: none;
}
::ng-deep .mat-form-field-wrapper {
padding: 0em !important;
}
::ng-deep .mat-form-field-infix {
border: none;
}
::ng-deep .align-arrow-right {
display: none;
}
.invite-btn {
width: 6.64em;
height: 2.93em;
background: #FFFFFF;
border: 1px solid #B5B5B5;
border-radius: 30px;
font-weight: bold;
letter-spacing: -0.35px;
color: #B5B5B5;
margin-bottom: 0.25em;
}
.select-role {
width: 16% !important;
font-size: 14px;
color: #848484;
height: min-content;
margin-right: 2.5rem;
border: none;
background-color: transparent;
}

View File

@ -1,127 +0,0 @@
import { COMMA, ENTER } from '@angular/cdk/keycodes';
import { Component, Inject, OnInit, ViewChild } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { MatChipInputEvent } from '@angular/material/chips';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { DmpInvitation } from '@app/core/model/dmp/invitation/dmp-invitation';
import { DmpInvitationUser } from '@app/core/model/dmp/invitation/dmp-invitation-user';
import { DmpInvitationUserCriteria } from '@app/core/query/dmp/dmp-invitation-user-criteria';
import { RequestItem } from '@app/core/query/request-item';
import { DmpInvitationService } from '@app/core/services/dmp/dmp-invitation.service';
import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration';
import { BaseComponent } from '@common/base/base.component';
import { Observable } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';
import { Role } from '@app/core/common/enum/role';
@Component({
selector: 'app-invitation-component',
templateUrl: 'dmp-invitation.component.html',
styleUrls: ['./dmp-invitation.component.scss'],
})
export class DmpInvitationDialogComponent extends BaseComponent implements OnInit {
public formGroup: FormGroup;
public filteredUsersAsync = false;
public filteredUsers: DmpInvitationUser[];
public emails: string[] = [];
public roles = Role;
public roleNames: string[];
visible = true;
selectable = true;
removable = true;
addOnBlur = true;
readonly separatorKeysCodes: number[] = [ENTER, COMMA];
constructor(
public invitationService: DmpInvitationService,
public route: ActivatedRoute,
public router: Router,
public dialogRef: MatDialogRef<DmpInvitationDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any
) {
super();
this.roleNames = Object.keys(this.roles).filter(key => key.length > 1);
}
ngOnInit(): void {
const invitation = new DmpInvitation();
invitation.dataManagementPlan = this.data.dmpId;
this.formGroup = invitation.buildForm();
}
usersAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = {
filterFn: this.filterUsers.bind(this),
initialItems: (excludedItems: any[]) => this.filterUsers('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
displayFn: (item) => typeof(item) === 'string' ? item : item.name,
titleFn: (item) => typeof(item) === 'string' ? item : item.name,
valueAssign: (item) => {
const result = typeof(item) === 'string' ? item : item.email;
return result;
}
};
add(event: MatChipInputEvent): void {
const input = event.input;
const value = event.value;
if ((value || '').trim()) {
this.emails.push(value.trim());
}
if (input) {
input.value = '';
}
}
remove(email: string): void {
const index = this.emails.indexOf(email);
if (index >= 0) {
this.emails.splice(index, 1);
}
}
send(value: any) {
let invitationObject: any = {};
invitationObject.dataManagementPlan = this.data.dmpId;
invitationObject.role = this.formGroup.get('role').value;
invitationObject.users = [];
invitationObject.users.push(...(<any[]>this.formGroup.get('users').value).filter(user => typeof(user) === 'string').map(email => ({ email: email, name: email })));
invitationObject.users.push(...(<any[]>this.formGroup.get('users').value).filter(user => typeof(user) !== 'string'));
//invitationObject.users.push(...this.formGroup.get('users').value);
this.emails.forEach(email => {
invitationObject.users.push({ email: email, name: email });
});
this.invitationService.inviteDmpInvitationUsers(invitationObject)
.pipe(takeUntil(this._destroyed))
.subscribe(
null, null, () => this.dialogRef.close()
);
}
closeDialog(): void {
this.dialogRef.close();
}
filterUsers(value: string): Observable<DmpInvitationUser[]> {
this.filteredUsers = undefined;
this.filteredUsersAsync = true;
const request = new RequestItem<DmpInvitationUserCriteria>();
request.criteria = { like: value };
return this.invitationService.getDmpInvitationUsers(request)
.pipe(takeUntil(this._destroyed));
// .subscribe(items => {
// this.filteredUsers = new JsonSerializer<DmpInvitationUser>(DmpInvitationUser).fromJSONArray(items);
// if (!this.filteredUsers || this.filteredUsers.length === 0) {
// const user = new DmpInvitationUser();
// user.email = value;
// user.name = value;
// this.filteredUsers.push(user);
// }
// this.filteredUsersAsync = false;
// });
}
}

View File

@ -17,6 +17,7 @@ import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog
import { UiNotificationService, SnackBarNotificationLevel } from '@app/core/services/notification/ui-notification-service';
import { Role } from '@app/core/common/enum/role';
import { LockService } from '@app/core/services/lock/lock.service';
import { Location } from '@angular/common';
@Component({
selector: 'app-dmp-listing-item-component',
@ -43,7 +44,8 @@ export class DmpListingItemComponent extends BaseComponent implements OnInit {
private dmpService: DmpService,
private language: TranslateService,
private uiNotificationService: UiNotificationService,
private lockService: LockService) {
private lockService: LockService,
private location: Location) {
super();
}
@ -226,13 +228,14 @@ export class DmpListingItemComponent extends BaseComponent implements OnInit {
}
reloadPage(): void {
const path = this.location.path();
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate(['/plans']);
this.router.navigate([path]);
});
}
onDeleteCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DATASET-PROFILE-DELETE'), SnackBarNotificationLevel.Success);
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DELETE'), SnackBarNotificationLevel.Success);
this.reloadPage();
}
@ -240,6 +243,11 @@ export class DmpListingItemComponent extends BaseComponent implements OnInit {
this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-DELETE'), SnackBarNotificationLevel.Error);
}
onCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
this.router.navigate(['/plans']);
}
isUserOwner(activity: DmpListingModel): boolean {
const principal: Principal = this.authentication.current();
if (principal) return principal.id === activity.users.find(x => x.role === Role.Owner).id;

View File

@ -231,7 +231,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
}
onDeleteCallbackSuccess(): void {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DATASET-PROFILE-DELETE'), SnackBarNotificationLevel.Success);
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DELETE'), SnackBarNotificationLevel.Success);
this.router.navigate(['/plans']);
}
@ -607,8 +607,9 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
}
reloadPage(): void {
const path = this.location.path();
this.router.navigateByUrl('/reload', { skipLocationChange: true }).then(() => {
this.router.navigate([`/plans/overview/${this.dmp.id}`]);
this.router.navigate([path]);
});
}

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,7 @@
"UNSUCCESSFUL-LOGIN": "Unsuccessful Login",
"SUCCESSFUL-DATASET-PROFILE-DELETE": "Successful Delete",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE": "This template can not deleted, because Dataset Descriptions are associated with it",
"SUCCESSFUL-DELETE": "Successful Delete",
"UNSUCCESSFUL-DELETE": "Unsuccessful Delete",
"UNSUCCESSFUL-EMAIL-SEND": "Failed sending email"
},
@ -140,7 +141,9 @@
"LANGUAGES": {
"ENGLISH": "English",
"GREEK": "Greek",
"SPANISH": "Spanish"
"SPANISH": "Spanish",
"GERMAN": "German",
"TURKISH": "Turkish"
}
},
"COOKIE": {

View File

@ -21,6 +21,7 @@
"UNSUCCESSFUL-LOGIN": "Inicio de sesión fallido",
"SUCCESSFUL-DATASET-PROFILE-DELETE": "Borrado correcto",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE": "Esta plantilla no se puede borrar, porque está asociada a descripciones del Dataset",
"SUCCESSFUL-DELETE": "Borrado correcto",
"UNSUCCESSFUL-DELETE": "Borrado fallido",
"UNSUCCESSFUL-EMAIL-SEND": "Fallo enviando el correo"
},

View File

@ -21,6 +21,7 @@
"UNSUCCESSFUL-LOGIN": "Αποτυχημένη σύνδεση",
"SUCCESSFUL-DATASET-PROFILE-DELETE": "Επιτυχής διαγραφή",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE": "Το template δεν μπορεί να διαγραφεί, επειδή οι περιγραφές των συνόλων δεδομένων σχετίζονται με αυτό",
"SUCCESSFUL-DELETE": "Επιτυχής διαγραφή",
"UNSUCCESSFUL-DELETE": "Αποτυχημένη διαγραφή",
"UNSUCCESSFUL-EMAIL-SEND": "Αποτυχία αποστολής email"
},

File diff suppressed because it is too large Load Diff

View File

@ -10,5 +10,13 @@
{
"label": "GENERAL.LANGUAGES.SPANISH",
"value": "es"
},
{
"label": "GENERAL.LANGUAGES.GERMAN",
"value": "de"
},
{
"label": "GENERAL.LANGUAGES.TURKISH",
"value": "tr"
}
]

View File

@ -66,21 +66,21 @@
<div class="row title-4">Translators</div>
</div>
<div class="card mt-3 flex-row">
<img class="col-4 flag" alt="Flag of Greece" src="../../images/contributors/flag-greece.png">
<img class="col-4 flag" alt="Flag of Greece" src="../assets/img/flag-greece.png">
<div class="col-8 card-body" class="flex-column align-items-center">
<p class="card-text-1">Athena Research & Innovation Center</p>
<p class="card-text-2">Dimitra Aglamisi, Elli Papadopoulou</p>
</div>
</div>
<div class="card flex-row">
<img class="col-4 card-img" alt="Flag of Spain" src="../../images/contributors/NoPath - Copy (7).png">
<img class="col-4 card-img" alt="Flag of Spain" src="../assets/img/NoPath - Copy (7).png">
<div class="col-8 card-body" class="flex-column align-items-center">
<p class="card-text-1">Consorcio Madroño</p>
<p class="card-text-2">Lanko López, Juan Corrales Correyero, Fernando González Ballesteros</p>
</div>
</div>
<div class="card flex-row">
<img class="col-4 card-img" alt="Flag of Turkey" src="../../images/contributors/Image 82.png">
<img class="col-4 card-img" alt="Flag of Turkey" src="../assets/img/Image 82.png">
<div class="col-8 card-body" class="flex-column align-items-center">
<p class="card-text-1">Turkish Higher Education Council Research Data and Open Data working group</p>
</div>

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB