DMP editor. Show popup dialog when dmp is locked.

spring-update
Kristian Ntavidi 3 years ago
parent 9161dbda56
commit 92b60c7c90

@ -54,6 +54,7 @@ import { DmpToDatasetDialogComponent } from '../dmp-to-dataset/dmp-to-dataset-di
import { GrantEditorModel } from '@app/ui/grant/editor/grant-editor.model'; import { GrantEditorModel } from '@app/ui/grant/editor/grant-editor.model';
import { MatomoService } from '@app/core/services/matomo/matomo-service'; import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
@Component({ @Component({
selector: 'app-dmp-editor-component', selector: 'app-dmp-editor-component',
@ -188,6 +189,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
if(this.isUserMember()){ if(this.isUserMember()){
this.router.navigate(['plans', 'overview', itemId]); this.router.navigate(['plans', 'overview', itemId]);
return;
} }
this.isFinalized = true; this.isFinalized = true;
this.formGroup.disable(); this.formGroup.disable();
@ -234,6 +236,12 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
.subscribe(x => { .subscribe(x => {
this.formChanged(); this.formChanged();
}); });
if(this.lockStatus){
this.dialog.open(PopupNotificationDialogComponent,{data:{
title:this.language.instant('DMP-EDITOR.LOCKED.TITLE'),
message:this.language.instant('DMP-EDITOR.LOCKED.MESSAGE')
}, maxWidth:'30em'});
}
}) })
}); });
} else if (publicId != null) { } else if (publicId != null) {

@ -1052,6 +1052,10 @@
"CLONE": "Clone", "CLONE": "Clone",
"SAVE": "Save", "SAVE": "Save",
"CANCEL": "Cancel" "CANCEL": "Cancel"
},
"LOCKED":{
"TITLE":"DMP is locked",
"MESSAGE":"Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
} }
}, },
"DMP-PROFILE-LISTING": { "DMP-PROFILE-LISTING": {

@ -1052,6 +1052,10 @@
"CLONE": "Clone", "CLONE": "Clone",
"SAVE": "Save", "SAVE": "Save",
"CANCEL": "Cancel" "CANCEL": "Cancel"
},
"LOCKED":{
"TITLE":"DMP is locked",
"MESSAGE":"Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
} }
}, },
"DMP-PROFILE-LISTING": { "DMP-PROFILE-LISTING": {

@ -1052,6 +1052,10 @@
"CLONE": "Clone", "CLONE": "Clone",
"SAVE": "Save", "SAVE": "Save",
"CANCEL": "Cancel" "CANCEL": "Cancel"
},
"LOCKED":{
"TITLE":"DMP is locked",
"MESSAGE":"Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
} }
}, },
"DMP-PROFILE-LISTING": { "DMP-PROFILE-LISTING": {

@ -1052,6 +1052,10 @@
"CLONE": "Κλώνος", "CLONE": "Κλώνος",
"SAVE": "Αποθήκευση", "SAVE": "Αποθήκευση",
"CANCEL": "Ακύρωση" "CANCEL": "Ακύρωση"
},
"LOCKED":{
"TITLE":"DMP is locked",
"MESSAGE":"Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
} }
}, },
"DMP-PROFILE-LISTING": { "DMP-PROFILE-LISTING": {

@ -1052,6 +1052,10 @@
"CLONE": "Duplicar", "CLONE": "Duplicar",
"SAVE": "Guardar", "SAVE": "Guardar",
"CANCEL": "Cancelar" "CANCEL": "Cancelar"
},
"LOCKED":{
"TITLE":"DMP is locked",
"MESSAGE":"Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
} }
}, },
"DMP-PROFILE-LISTING": { "DMP-PROFILE-LISTING": {

@ -1052,6 +1052,10 @@
"CLONE": "Klonovať", "CLONE": "Klonovať",
"SAVE": "Uložiť", "SAVE": "Uložiť",
"CANCEL": "Zrušiť" "CANCEL": "Zrušiť"
},
"LOCKED":{
"TITLE":"DMP is locked",
"MESSAGE":"Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
} }
}, },
"DMP-PROFILE-LISTING": { "DMP-PROFILE-LISTING": {

@ -1052,6 +1052,10 @@
"CLONE": "Napravite kopiju", "CLONE": "Napravite kopiju",
"SAVE": "Sačuvajte", "SAVE": "Sačuvajte",
"CANCEL": "Otkažite" "CANCEL": "Otkažite"
},
"LOCKED":{
"TITLE":"DMP is locked",
"MESSAGE":"Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
} }
}, },
"DMP-PROFILE-LISTING": { "DMP-PROFILE-LISTING": {

@ -1052,6 +1052,10 @@
"CLONE": "Çoğalt", "CLONE": "Çoğalt",
"SAVE": "Kaydet", "SAVE": "Kaydet",
"CANCEL": "İptal" "CANCEL": "İptal"
},
"LOCKED":{
"TITLE":"DMP is locked",
"MESSAGE":"Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
} }
}, },
"DMP-PROFILE-LISTING": { "DMP-PROFILE-LISTING": {

Loading…
Cancel
Save