From 5ff63f3ce9fb0537236f8902e90ade8559dadb89 Mon Sep 17 00:00:00 2001 From: dtziotzios Date: Thu, 24 Jan 2019 12:46:29 +0200 Subject: [PATCH] Add functionality create DMP from project list Panel --- dmp-frontend/src/app/app.component.html | 1 + .../common/date/moment-utc-date-adapter.ts | 2 +- .../src/app/core/common/enum/auth-provider.ts | 7 ++- .../editor/dmp-profile-editor.component.ts | 12 ++-- .../role-editor/user-role-editor.component.ts | 18 ++---- .../dataset-wizard.component.ts | 10 ++-- dmp-frontend/src/app/ui/dmp/dmp.routing.ts | 7 +++ .../app/ui/dmp/editor/dmp-editor.component.ts | 60 +++++++++++-------- .../ui/dmp/listing/dmp-listing.component.html | 5 +- .../app/ui/dmp/wizard/dmp-wizard.component.ts | 10 ++-- .../editor/dmp-wizard-editor.component.ts | 11 ++-- .../editor/project-editor.component.ts | 7 +-- .../listing/project-listing.component.scss | 3 +- dmp-frontend/src/assets/i18n/en.json | 9 ++- 14 files changed, 88 insertions(+), 74 deletions(-) diff --git a/dmp-frontend/src/app/app.component.html b/dmp-frontend/src/app/app.component.html index 66556188c..1fbd999b4 100644 --- a/dmp-frontend/src/app/app.component.html +++ b/dmp-frontend/src/app/app.component.html @@ -20,3 +20,4 @@ + diff --git a/dmp-frontend/src/app/common/date/moment-utc-date-adapter.ts b/dmp-frontend/src/app/common/date/moment-utc-date-adapter.ts index 66903147f..722f3ae2f 100644 --- a/dmp-frontend/src/app/common/date/moment-utc-date-adapter.ts +++ b/dmp-frontend/src/app/common/date/moment-utc-date-adapter.ts @@ -36,7 +36,7 @@ export class MomentUtcDateAdapter extends MomentDateAdapter { // manually writing on the textbox parse(value: any, parseFormat: string | string[]): Moment | null { const initialParse = super.parse(value, parseFormat); - if (!initialParse.isValid()) { return initialParse; } + if (initialParse === null || !initialParse.isValid()) { return initialParse; } const result = moment.utc({ year: initialParse.year(), month: initialParse.month(), date: initialParse.date() }).locale(this.locale); return result; diff --git a/dmp-frontend/src/app/core/common/enum/auth-provider.ts b/dmp-frontend/src/app/core/common/enum/auth-provider.ts index a6e87c9a1..c1302645c 100644 --- a/dmp-frontend/src/app/core/common/enum/auth-provider.ts +++ b/dmp-frontend/src/app/core/common/enum/auth-provider.ts @@ -1,7 +1,8 @@ export enum AuthProvider { - LinkedIn = 1, + Google = 1, Facebook = 2, Twitter = 3, - Google = 4, - B2Access = 5 + LinkedIn = 4, + //NativeLogin=5, + B2Access = 6 } diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts index 9d0edef15..cc5fb22ac 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts @@ -1,6 +1,5 @@ import { AfterViewInit, Component } from '@angular/core'; import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; import { ActivatedRoute, Params, Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { takeUntil } from 'rxjs/operators'; @@ -11,8 +10,8 @@ import { DmpProfileFieldDataType } from '../../../../core/common/enum/dmp-profil import { DmpProfileType } from '../../../../core/common/enum/dmp-profile-type'; import { DmpProfile } from '../../../../core/model/dmp-profile/dmp-profile'; import { DmpProfileService } from '../../../../core/services/dmp/dmp-profile.service'; +import { SnackBarNotificationLevel, UiNotificationService } from '../../../../core/services/notification/ui-notification-service'; import { EnumUtils } from '../../../../core/services/utilities/enum-utils.service'; -import { SnackBarNotificationComponent } from '../../../../library/notification/snack-bar/snack-bar-notification.component'; import { DmpProfileEditorModel, DmpProfileFieldEditorModel } from './dmp-profile-editor.model'; @Component({ @@ -30,10 +29,10 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie constructor( private dmpProfileService: DmpProfileService, private route: ActivatedRoute, - private snackBar: MatSnackBar, private router: Router, private language: TranslateService, - private enumUtils: EnumUtils + private enumUtils: EnumUtils, + private uiNotificationService: UiNotificationService ) { super(); } @@ -81,10 +80,7 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie } onCallbackSuccess(): void { - this.snackBar.openFromComponent(SnackBarNotificationComponent, { - data: { message: this.isNew ? 'GENERAL.SNACK-BAR.SUCCESSFUL-CREATION' : 'GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE', language: this.language }, - duration: 3000, - }); + this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.router.navigate(['/dmp-profiles']); } diff --git a/dmp-frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.ts b/dmp-frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.ts index a6ff3d3fe..ca4393546 100644 --- a/dmp-frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.ts @@ -1,6 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup } from '@angular/forms'; -import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; import { takeUntil } from 'rxjs/operators'; import { Validation, ValidationContext } from '../../../../../common/forms/validation/validation-context'; @@ -9,7 +8,7 @@ import { AppRole } from '../../../../../core/common/enum/app-role'; import { UserListingModel } from '../../../../../core/model/user/user-listing'; import { UserService } from '../../../../../core/services/user/user.service'; import { EnumUtils } from '../../../../../core/services/utilities/enum-utils.service'; -import { SnackBarNotificationComponent } from '../../../../../library/notification/snack-bar/snack-bar-notification.component'; +import { SnackBarNotificationLevel, UiNotificationService } from '../../../../../core/services/notification/ui-notification-service'; @Component({ selector: 'app-user-role-editor-component', @@ -26,8 +25,8 @@ export class UserRoleEditorComponent extends BaseComponent implements OnInit { private language: TranslateService, private userService: UserService, private formBuilder: FormBuilder, - private snackBar: MatSnackBar, - private enumUtils: EnumUtils + private enumUtils: EnumUtils, + private uiNotificationService:UiNotificationService ) { super(); } ngOnInit() { @@ -118,17 +117,12 @@ export class UserRoleEditorComponent extends BaseComponent implements OnInit { onCallbackSuccess() { this.nowEditing = false; this.formGroup.disable(); - this.snackBar.openFromComponent(SnackBarNotificationComponent, { - data: { message: 'GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE', language: this.language }, - duration: 3000, - }); + this.uiNotificationService.snackBarNotification( this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); } + onCallbackError(error: any) { this.validateAllFormFields(this.formGroup); - this.snackBar.openFromComponent(SnackBarNotificationComponent, { - data: { message: 'GENERAL.SNACK-BAR.UNSUCCESSFUL-UPDATE', language: this.language }, - duration: 3000, - }); + this.uiNotificationService.snackBarNotification( this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Error); } getPrincipalAppRoleValues(): Number[] { 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 258145868..d6b578290 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 @@ -20,11 +20,11 @@ import { DmpService } from '../../../core/services/dmp/dmp.service'; import { ExternalSourcesConfigurationService } from '../../../core/services/external-sources/external-sources-configuration.service'; import { ExternalSourcesService } from '../../../core/services/external-sources/external-sources.service'; import { SingleAutoCompleteConfiguration } from '../../../library/auto-complete/single/single-auto-complete-configuration'; -import { SnackBarNotificationComponent } from '../../../library/notification/snack-bar/snack-bar-notification.component'; import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item'; import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent'; import { DatasetDescriptionFormEditorModel } from '../../misc/dataset-description-form/dataset-description-form.model'; import { DatasetWizardEditorModel } from './dataset-wizard-editor.model'; +import { SnackBarNotificationLevel, UiNotificationService } from '../../../core/services/notification/ui-notification-service'; @Component({ selector: 'app-dataset-wizard-component', @@ -63,7 +63,8 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, Aft public externalSourcesService: ExternalSourcesService, public dmpService: DmpService, public dialog: MatDialog, - public externalSourcesConfigurationService: ExternalSourcesConfigurationService + public externalSourcesConfigurationService: ExternalSourcesConfigurationService, + private uiNotificationService:UiNotificationService ) { super(); } @@ -293,10 +294,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, Aft } onCallbackSuccess(): void { - this.snackBar.openFromComponent(SnackBarNotificationComponent, { - data: { message: this.isNew ? 'GENERAL.SNACK-BAR.SUCCESSFUL-CREATION' : 'GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE', language: this.language }, - duration: 3000, - }); + this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); } onCallbackError(error: any) { diff --git a/dmp-frontend/src/app/ui/dmp/dmp.routing.ts b/dmp-frontend/src/app/ui/dmp/dmp.routing.ts index f8f632de3..36c2f22d2 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp.routing.ts +++ b/dmp-frontend/src/app/ui/dmp/dmp.routing.ts @@ -34,6 +34,13 @@ const routes: Routes = [ breadcrumb: true }, }, + { + path: 'new/project/:projectId', + component: DmpEditorComponent, + data: { + breadcrumbs: 'new' + } + }, { path: 'new', component: DmpEditorComponent, diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts index f983eb5be..726c7d331 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts @@ -23,7 +23,6 @@ import { ExternalSourcesService } from '../../../core/services/external-sources/ import { ProjectService } from '../../../core/services/project/project.service'; import { MultipleAutoCompleteConfiguration } from '../../../library/auto-complete/multiple/multiple-auto-complete-configuration'; import { SingleAutoCompleteConfiguration } from '../../../library/auto-complete/single/single-auto-complete-configuration'; -import { SnackBarNotificationComponent } from '../../../library/notification/snack-bar/snack-bar-notification.component'; import { RequestItem } from '../../../core/query/request-item'; import { LanguageResolverService } from '../../../services/language-resolver/language-resolver.service'; import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item'; @@ -33,6 +32,8 @@ import { AvailableProfilesComponent } from './available-profiles/available-profi import { DmpEditorModel } from './dmp-editor.model'; import { DmpFinalizeDialogComponent } from './dmp-finalize-dialog/dmp-finalize-dialog.component'; import { ValidationErrorModel } from '../../../common/forms/validation/error-model/validation-error-model'; +import { SnackBarNotificationLevel, UiNotificationService } from '../../../core/services/notification/ui-notification-service'; +import { ProjectModel } from '../../../core/model/project/project'; @Component({ selector: 'app-dmp-editor-component', @@ -77,7 +78,8 @@ export class DmpEditorComponent extends BaseComponent implements AfterViewInit, private _service: DmpService, private dialog: MatDialog, private _viewContainerRef: ViewContainerRef, - public languageResolverService: LanguageResolverService + public languageResolverService: LanguageResolverService, + private uiNotificationService: UiNotificationService ) { super(); // this.filteredOptions = dmpProfileService.getAll({ criteria: new DmpProfileCriteria() }); @@ -88,17 +90,16 @@ export class DmpEditorComponent extends BaseComponent implements AfterViewInit, .pipe(takeUntil(this._destroyed)) .subscribe((params: Params) => { const itemId = params['id']; + const projectId = params['projectId']; const projectRequestItem: RequestItem = new RequestItem(); projectRequestItem.criteria = new ProjectCriteria(); const organisationRequestItem: RequestItem = new RequestItem(); organisationRequestItem.criteria = new BaseCriteria(); - - this.projectAutoCompleteConfiguration = { filterFn: this.searchProject.bind(this), - initialItems:(extraData) => this.searchProject(''), + initialItems: (extraData) => this.searchProject(''), displayFn: (item) => item['label'], titleFn: (item) => item['label'] }; @@ -145,24 +146,24 @@ export class DmpEditorComponent extends BaseComponent implements AfterViewInit, ); this.associatedUsers = data.associatedUsers; }); + } else if (projectId != null) { + this.isNew = true; + this.projectService.getSingle(projectId).map(data => data as ProjectModel) + .pipe(takeUntil(this._destroyed)) + .subscribe(data => { + this.dmp = new DmpEditorModel(); + this.dmp.project = data; + this.formGroup = this.dmp.buildForm(); + this.formGroup.get('project').disable(); + this.registerFormEventsForNewItem(); + }); } else { this.dmp = new DmpEditorModel(); - setTimeout(async () => { - this.formGroup = this.dmp.buildForm(); - if (this.formGroup.get('profile') && this.formGroup.get('profile').value) { - this.textCtrl.patchValue(this.formGroup.get('profile').value); - } - this.breadCrumbs = Observable.of([ - { - parentComponentName: 'DmpListingComponent', - label: 'DMPs', - url: 'dmps', - } - ]); - }); + this.formGroup = this.dmp.buildForm(); + this.registerFormEventsForNewItem(); } - }); + this.route .queryParams .pipe(takeUntil(this._destroyed)) @@ -171,6 +172,20 @@ export class DmpEditorComponent extends BaseComponent implements AfterViewInit, }); } + registerFormEventsForNewItem() { + if (this.formGroup.get('profile') && this.formGroup.get('profile').value) { + this.textCtrl.patchValue(this.formGroup.get('profile').value); + } + + this.breadCrumbs = Observable.of([ + { + parentComponentName: 'DmpListingComponent', + label: 'DMPs', + url: 'dmps', + } + ]); + } + searchProject(query: string) { const projectRequestItem: RequestItem = new RequestItem(); projectRequestItem.criteria = new ProjectCriteria(); @@ -189,7 +204,7 @@ export class DmpEditorComponent extends BaseComponent implements AfterViewInit, } onSubmit(): void { - this.dmpService.createDmp(this.formGroup.value) + this.dmpService.createDmp(this.formGroup.getRawValue()) .pipe(takeUntil(this._destroyed)) .subscribe( complete => this.onCallbackSuccess(), @@ -198,10 +213,7 @@ export class DmpEditorComponent extends BaseComponent implements AfterViewInit, } onCallbackSuccess(): void { - this.snackBar.openFromComponent(SnackBarNotificationComponent, { - data: { message: this.isNew ? 'GENERAL.SNACK-BAR.SUCCESSFUL-CREATION' : 'GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE', language: this.language }, - duration: 3000, - }); + this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.router.navigate(['/plans']); } diff --git a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.html b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.html index 68de193bc..04cb880c2 100644 --- a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.html +++ b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.html @@ -82,7 +82,10 @@ - + diff --git a/dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard.component.ts b/dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard.component.ts index 1f2d28f14..794575608 100644 --- a/dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard.component.ts @@ -9,10 +9,10 @@ import { ValidationErrorModel } from '../../../common/forms/validation/error-mod import { BaseComponent } from '../../../core/common/base/base.component'; import { DmpModel } from '../../../core/model/dmp/dmp'; import { DmpService } from '../../../core/services/dmp/dmp.service'; -import { SnackBarNotificationComponent } from '../../../library/notification/snack-bar/snack-bar-notification.component'; import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item'; import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent'; import { DmpWizardEditorModel } from './dmp-wizard-editor.model'; +import { SnackBarNotificationLevel, UiNotificationService } from '../../../core/services/notification/ui-notification-service'; @Component({ selector: 'app-dmp-wizard-component', @@ -32,7 +32,8 @@ export class DmpWizardComponent extends BaseComponent implements OnInit, IBreadC private language: TranslateService, private snackBar: MatSnackBar, private route: ActivatedRoute, - private router: Router + private router: Router, + private uiNotificationService:UiNotificationService ) { super(); } ngOnInit(): void { @@ -72,10 +73,7 @@ export class DmpWizardComponent extends BaseComponent implements OnInit, IBreadC } onCallbackSuccess(): void { - this.snackBar.openFromComponent(SnackBarNotificationComponent, { - data: { message: 'GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE', language: this.language }, - duration: 3000, - }); + this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.router.navigate(['/plans']); } diff --git a/dmp-frontend/src/app/ui/dmp/wizard/editor/dmp-wizard-editor.component.ts b/dmp-frontend/src/app/ui/dmp/wizard/editor/dmp-wizard-editor.component.ts index 8f0c9d7b3..45514cbfc 100644 --- a/dmp-frontend/src/app/ui/dmp/wizard/editor/dmp-wizard-editor.component.ts +++ b/dmp-frontend/src/app/ui/dmp/wizard/editor/dmp-wizard-editor.component.ts @@ -18,9 +18,8 @@ import { ExternalSourcesService } from '../../../../core/services/external-sourc import { ProjectService } from '../../../../core/services/project/project.service'; import { MultipleAutoCompleteConfiguration } from '../../../../library/auto-complete/multiple/multiple-auto-complete-configuration'; import { SingleAutoCompleteConfiguration } from '../../../../library/auto-complete/single/single-auto-complete-configuration'; -import { SnackBarNotificationComponent } from '../../../../library/notification/snack-bar/snack-bar-notification.component'; import { LanguageResolverService } from '../../../../services/language-resolver/language-resolver.service'; -import { ValidationErrorModel } from '../../../../common/forms/validation/error-model/validation-error-model'; +import { SnackBarNotificationLevel, UiNotificationService } from '../../../../core/services/notification/ui-notification-service'; @Component({ selector: 'app-dmp-wizard-editor-component', @@ -56,7 +55,8 @@ export class DmpWizardEditorComponent extends BaseComponent implements OnInit { public router: Router, public language: TranslateService, private _service: DmpService, - private languageResolverService: LanguageResolverService + private languageResolverService: LanguageResolverService, + private uiNotificationService:UiNotificationService ) { super(); } @@ -133,10 +133,7 @@ export class DmpWizardEditorComponent extends BaseComponent implements OnInit { } onCallbackSuccess(): void { - this.snackBar.openFromComponent(SnackBarNotificationComponent, { - data: { message: this.isNew ? 'GENERAL.SNACK-BAR.SUCCESSFUL-CREATION' : 'GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE', language: this.language }, - duration: 3000, - }); + this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.router.navigate(['/plans']); } diff --git a/dmp-frontend/src/app/ui/project/editor/project-editor.component.ts b/dmp-frontend/src/app/ui/project/editor/project-editor.component.ts index e515fb3d5..654e2aa38 100644 --- a/dmp-frontend/src/app/ui/project/editor/project-editor.component.ts +++ b/dmp-frontend/src/app/ui/project/editor/project-editor.component.ts @@ -17,6 +17,7 @@ import { SnackBarNotificationComponent } from '../../../library/notification/sna import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item'; import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent'; import { ProjectEditorModel } from './project-editor.model'; +import { SnackBarNotificationLevel, UiNotificationService } from '../../../core/services/notification/ui-notification-service'; @Component({ selector: 'app-project-editor-component', @@ -39,6 +40,7 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr public language: TranslateService, private dialog: MatDialog, private projectFileUploadService: ProjectFileUploadService, + private uiNotificationService:UiNotificationService ) { super(); } @@ -92,10 +94,7 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr } onCallbackSuccess(): void { - this.snackBar.openFromComponent(SnackBarNotificationComponent, { - data: { message: this.isNew ? 'GENERAL.SNACK-BAR.SUCCESSFUL-CREATION' : 'GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE', language: this.language }, - duration: 3000, - }); + this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.router.navigate(['/projects']); } diff --git a/dmp-frontend/src/app/ui/project/listing/project-listing.component.scss b/dmp-frontend/src/app/ui/project/listing/project-listing.component.scss index 3056f0982..2d0f31449 100644 --- a/dmp-frontend/src/app/ui/project/listing/project-listing.component.scss +++ b/dmp-frontend/src/app/ui/project/listing/project-listing.component.scss @@ -20,6 +20,7 @@ right: 20px !important; bottom: 10px !important; left: auto !important; - position: fixed !important; + position: fixed !important; + z-index: 5; } } diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 3ab907f3b..e2d7efd86 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -26,7 +26,14 @@ "STATUSES": { "EDIT": "Edited", "FINALISED": "Finalized" - } + }, + "CONFIRMATION-DIALOG": { + "DELETE-ITEM": "Delete this item?", + "ACTIONS": { + "CONFIRM": "Yes", + "CANCEL": "No" + } + } }, "NAV-BAR": { "TITLE": "OpenDMP",