[Library | data-transfer-v2]: transferData.component.ts: Scroll to message not only if transfer status was successful.

This commit is contained in:
Konstantina Galouni 2023-03-07 15:43:49 +02:00
parent cde97c09b9
commit 029db9f52e
1 changed files with 6 additions and 0 deletions

View File

@ -185,6 +185,8 @@ export class EGIDataTransferComponent {
this.status = "errorParser";
this.message = error.error && error.error.id && error.error.id == 'doiNotSupported'?'DOI not supported.':( error.error && error.error.description && error.error.description? (error.error.description+'.'):'Error parsing information.') ;
this.statusMessage = "danger";
this.cdr.detectChanges();
HelperFunctions.scrollToId("transferAlert");
/* UIkit.notification(this.message, {
status: 'error',
timeout: 3000,
@ -275,6 +277,8 @@ export class EGIDataTransferComponent {
this.status = "failed";
this.message = "Files could not be transfered.";
this.statusMessage = "danger";
this.cdr.detectChanges();
HelperFunctions.scrollToId("transferAlert");
// UIkit.notification("Couldn't transfer files", {
// status: 'error',
// timeout: 6000,
@ -287,6 +291,8 @@ export class EGIDataTransferComponent {
this.status = "errorUser";
this.message = "User cannot be authenticated.";
this.statusMessage = "danger";
this.cdr.detectChanges();
HelperFunctions.scrollToId("transferAlert");
// UIkit.notification("User can't be authenticated!", {
// status: 'error',
// timeout: 6000,